Multiple HTTP headers of the same type cannot be handled (Known Issue)
Series 40 DP 1.1
Series 40 DP 1.0
Series 40 6th Edition FP1
Series 40 6th Edition (initial release)
Series 40 5th Edition FP1
Series 40 5th Edition (initial release)
Series 40 3rd Edition FP2
Series 40 3rd Edition FP1
Series 40 3rd Edition (initial release)
Series 40 2nd Edition
S60 3rd Edition FP2
S60 3rd Edition FP1
S60 3rd Edition (initial release)
S60 2nd Edition FP3
S60 2nd Edition FP2
S60 2nd Edition (initial release)
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 headerName = conn.getHeaderFieldKey(index);
httpString = headerName + ": " + conn.getHeaderField(index) + "\n";
//TODO: implement a Form and insert the result HTTP string to the Form
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.