Multiple HTTP headers of the same type cannot be handled (Known Issue)
Article Metadata
Tested with
Devices(s): All Series 40 platform devices (see 'Platform'); All S60 3rd Edition devices
Compatibility
Platform(s): Series 40: 2nd Edition, 3rd Edition + FP1, FP2; 5th Edition + FP1 + FP1 Lite; 6th Edition; S60: 3rd Edition
Article
Created: User:Technical writer 1
(25 Mar 2008)
Last edited: skalogir
(16 Aug 2012)
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 is most definitely not fixed in the latest (3.0633.69.00) firmware for our e61 devices. Multiple set-cookie headers are ignored, and only the first cookie is parsed and stored.
Nokia 6120c is not fixed yet. (date:2008-12-16)
Skalogir - Update 16th of August 2012
This issue is still present and affects both Symbian and Series 40 devices. After extensive hands on testing, I have updated the categories. The error is fixed on S60 5th Edition and Series 40 Developer Platform 2.0. Any previous platforms are affected by this.skalogir 14:14, 16 August 2012 (EEST)