×

Discussion Board

Page 2 of 2 FirstFirst 12
Results 16 to 25 of 25
  1. #16
    Registered User
    Join Date
    Apr 2006
    Posts
    24

    Re: KVM crashes when reading content with HTTP "302 Found" response on N90 and 6680

    Thanks again Peter.

    I can confirm now that no header is read after a 302
    response.

    Evidently I'll have to rearrage the code following
    http://discussion.forum.nokia.com/fo...ead.php?t=6196
    receipe adding a proper parser of the headers.

    I won't do anything 'till next weekend so if someone else want
    to take over this please be gentle and post the code snippet.

    Given that's pretty sure it's a bug in the device, ain't there any
    wise 'n nice Nokia guy out there that would like to help newbies
    and post the workaround?
    I know someone has had to solved this before!

    Regards,
    -Hernán.

  2. #17
    Regular Contributor
    Join Date
    Jun 2003
    Posts
    73

    Re: KVM crashes when reading content with HTTP "302 Found" response on N90 and 6680

    welcome to the "we are stuck by the http 302 bug CLUB" , let's keep the post float,maybe some Nokia guys would pay attention to this and fix the bug in later S60 phones. (hey, S40 do not have this problem.maybe something to learn from?)

  3. #18
    Regular Contributor
    Join Date
    Jun 2003
    Posts
    73

    Re: KVM crashes when reading content with HTTP "302 Found" response on N90 and 6680

    for now, we switch to socket connection when ever we meet 30x problem and get the redirect url, this is not perfect , but better than nothing.
    of course, there would be some problems opening a socket connection on port 80, have to self-sigh the jar for 6630/6680/6681/n70 , but this does not work on 3250 etc...

  4. #19
    Registered User
    Join Date
    Apr 2006
    Posts
    24

    Re: KVM crashes when reading content with HTTP "302 Found" response on N90 and 6680

    Quote Originally Posted by steven2ffff
    for now, we switch to socket connection when ever we meet 30x problem and get the redirect url, this is not perfect , but better than nothing.
    of course, there would be some problems opening a socket connection on port 80, have to self-sigh the jar for 6630/6680/6681/n70 , but this does not work on 3250 etc...
    Sorry... I don't get it... Why are you using sockets?
    Why don't you just open an input stream from the connection?
    Something like this:
    Code:
        if (status == HttpConnection.HTTP_TEMP_REDIRECT ||
                status == HttpConnection.HTTP_MOVED_TEMP ||
                status == HttpConnection.HTTP_MOVED_PERM) {
            // Get the new location and close the connection
            url = connection.getHeaderField("location");
            if (url == null) { // S60 devices workaround.
                in = new DataInputStream(connection.openInputStream());
                in.read(..etc..)
                // parse the input stream and get the new url.
                url = whatever;
            }
            connection.close();
        } else
             // break the loop.
    You might have to read in chunks since you won't have the
    total length.

    Do you see any problem with this approach?

    -H.

  5. #20
    Registered User
    Join Date
    Apr 2006
    Posts
    24

    Re: KVM crashes when reading content with HTTP "302 Found" response on N90 and 6680

    Quote Originally Posted by steven2ffff
    welcome to the "we are stuck by the http 302 bug CLUB" , let's keep the post float,maybe some Nokia guys would pay attention to this and fix the bug in later S60 phones. (hey, S40 do not have this problem.maybe something to learn from?)
    It might be possible that someday Nokia publish a patch for the OS. But
    there's already hundred of thousands mobiles out there that would be
    still be unpatched. I'd rather get a workaround for this.

    (rant)
    The last few days were my first contact with midp development. I have to
    say that I'm a bit dissapointed with Nokia and the dev community here
    in general. I've googled around and found that there are reports of this
    problem since 2003 but no solution whatsoever (apart from code skeleton
    from a sony-ericsson forum.) It's hard to believe that nobody had solved
    this nuisance since then.

    But let's be optimistic and believe that this has nothing to do with lack
    of willingness to help but because the community is small and of those
    the majority are working with propietary source code.
    (/rant)

    -H.

  6. #21
    Super Contributor
    Join Date
    Dec 2005
    Location
    Europe/Poland/Warsaw
    Posts
    1,697

    Re: KVM crashes when reading content with HTTP "302 Found" response on N90 and 6680

    hi Hernan,

    the main rant to raise here is that issuzilla is missing on ForumNokia (general Nokia/Symbian Java implementation),
    that's something really frustrating (I've learned about that studying "itemStageChanged" handler case),
    we should simply put issue to issuezilla - mark "valid/pending/whatever" and wait for response from FN tech team,
    Ron (FN) mentioned that renectly,
    Without issuezilla/bug report thats always up to us developers (enthusiast) to provide help ourselves - waiting for help can be a pain agree - especially if as you mentioned some topic was raised several months ago


    regards,
    Peter

  7. #22
    Registered User
    Join Date
    Apr 2006
    Posts
    24

    Re: KVM crashes when reading content with HTTP "302 Found" response on N90 and 6680

    Hi Peter!

    Quote Originally Posted by peterblazejewicz
    the main rant to raise here is that issuzilla is missing on ForumNokia (general Nokia/Symbian Java implementation),
    That might be, yes.

    We already have *many* issue reports. I've saw:
    - the "Known Issues" thread in this forum.
    - the Known Issues In The Nokia 6600 pdf
    - the Technical Library

    Nokia has bug trackers, they are not public though.

    Besides, there is the FN PRO tracker. Nokia claims that they fill the Technical
    Library with items from the FN PRO tracker they find relevant. I do want to
    be wrong but my feeling is that they are being conservative in excess.

    Regarding this particular bug, next weekend I'll update the "Known Issues"
    thread after I try some workarounds I'm thinking of. That's all I can do.

    -H.

  8. #23
    Super Contributor
    Join Date
    Dec 2005
    Location
    Europe/Poland/Warsaw
    Posts
    1,697

    Re: KVM crashes when reading content with HTTP "302 Found" response on N90 and 6680

    hi Hernan,

    yeah, and there are more - some are included e.g. in "Developing Scalable S40 Applications" book as side notes - but that's not the point - we need to be able to just plug into resource (via web browser) and check status - my IDE has issuzila - why api i'm trying to use does not?

    I do want to be wrong but my feeling is that they are being conservative in excess.
    @Hartti or Ron,
    what do you think?
    (asked you because you both put some efforts recently related to documentations/bug tracking across FN)

    regards,
    Peter

  9. #24
    Registered User
    Join Date
    Jul 2006
    Posts
    10

    Re: KVM crashes when reading content with HTTP "302 Found" response on N90 and 6680

    Hi

    Has anyone come across a fix for handling 302's? I keep getting a null URI when trying to handle the location redirect on the N70

  10. #25
    Registered User
    Join Date
    Feb 2008
    Posts
    2

    Re: KVM crashes when reading content with HTTP "302 Found" response on N90 and 6680

    Quote Originally Posted by Frans Kouwenhoven View Post
    Hi all,

    Trying to get my browser code running on a 6680, I encounter the same troubles as described above.

    Redirecting should provide a Location field, but as I enumerate all headers in the first response it's all empty (null)! Any emulator (not a S60) will provide the correct Location field.

    Peter, as I see in your code:

    Code:
    url = c.getHeaderField("location").trim();
    this statement will cause a NullPointerException. Is that the reason is seams to be frozen?

    Do you also face this null header fields?

    Regards,
    Frans
    First - c.getHeaderField("location").trim(); ---> is not so good programming - you are not taking in account the null response from teh getHeaderField
    better :
    x = c.getHeaderField("location")
    if (x!=null) x = x.trim.....

    Second - it might be the same problem with S60 see
    http://wiki.forum.nokia.com/index.ph...in_S60_devices

Similar Threads

  1. Play video downloaded over HTTP on 6680 and N90
    By Emmanuel Raulo in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2006-02-07, 08:29

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×