Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User tbabben's Avatar
    Join Date
    Mar 2003
    Posts
    9
    Hi,
    I'm developing a MIDP appilcation that sends alot of http requests to a server and I wan't to minimize the overhead that is sent in each http request.
    The Nokia phones I have tested on (7210, 3510i) adds a number of http headers with alot of information to each request. An example of what I receive on the server:
    ---
    POST /servlet/testservlet HTTP/1.1\r\n
    Host: myipaddress\r\n
    Accept: */*\r\n
    .......
    .......
    56-Profile-Diff-1: <?xml version="1.0"?><rdf:......LOTS of data..\r\n
    56-Profile-Diff-2: <?xml version="1.0"?><rdf:......LOTS of data..\r\n
    56-Profile-Diff-3: <?xml version="1.0"?><rdf:......LOTS of data..\r\n
    \r\n\r\n
    --------
    So each http request will consume about 800 bytes in header information. This is not very effective in a wirleless application.

    In particular the 56-Profile-Diff-n headers (which are related to UAProf) contains alot of info that I'm not interested in. But I have not found out a way of avoiding the phone to send these headers.

    If I try to set the headers in the application with e.g. c.setRequestProperty("56-Profile-Diff-1","a"), the http request will contain two headers with name 56-Profile-Diff-1. One with value "a" and one with a long value that the phone adds.
    Note that this only occurs with the 56-Profile headers. If I e.g. add my own User-Agent header (c.setRequestProperty("User-Agent","MyAgent")) only this User-Agent header is in the request and not the standard User-Agent header.

    Anyone having an idea of how to get the phone not to add the unnecessary headers?

    Best Regards
    Babben

  2. #2
    Registered User rsmithh's Avatar
    Join Date
    Mar 2003
    Posts
    33
    On the handsets you list, http traffic is routed via WAP. Therefore the headers are probably being added by the WAP gateway, not by the phone.

  3. #3
    Registered User tbabben's Avatar
    Join Date
    Mar 2003
    Posts
    9
    maybe... But when I messaure (using the GPRS data counter in the Call Register menu on my 7210) how many bytes that are sent, I can conclude that about 740 bytes are sent when doing one (1) request.
    Out of these 740 bytes the body is 11 bytes, so about 730 bytes must come from headers.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved