×
Namespaces

Variants
Actions

Multiple HTTP headers of the same type cannot be handled (Known Issue)

From Nokia Developer Wiki
Jump to: navigation, search

Description

This issue is originally related to Java ME and has been defined in Sun's Bug Database.

The origin of the problem is that Java ME expects that HTTP headers in a given response are unique, while a web server can return multiple headers of the same type in one response. In practice, this means that only the last one of the headers will be retrieved.

How to reproduce

The problem can be reproduced by showing the headers of a HTTP connection. This can be done as follows:

 HttpConnection conn = (HttpConnection) Connector.open(HTTP_URL);
..
String httpString;
int index=0;
 
while(conn.getHeaderFieldKey(index)!=null){
 
String headerName = conn.getHeaderFieldKey(index);
httpString = headerName + ": " + conn.getHeaderField(index) + "\n";
 
//TODO: implement a Form and insert the result HTTP string to the Form
 
index++;
}

Solution

For Series 40 devices, this issue will be fixed in the firmwares of future devices.

For S60 devices, the problem has been fixed in the latest firmware versions of S60 3rd Edition, Feature Pack 1 devices.

This page was last modified on 25 July 2013, at 11:06.
55 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×