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

Reply With Quote

