This page was last modified 08:10, 2 June 2008.
KIJ000854 - Multiple HTTP headers of the same type cannot be handled
From Forum Nokia Wiki
| ID | KIJ000854 | Creation date | March 25, 2008 |
| Platform | S60 3rd Edition | Devices | All S60 3rd Edition devices |
| Category | Java | Subcategory | Networking |
Overview
Multiple HTTP headers of the same type cannot be handled on devices prior to S60 3rd Edition, Feature Pack 1.
Description
Multiple HTTP headers of the same type cannot be handled on the devices prior to S60 3rd Edition, Feature Pack 1. 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 trying to enumerate the headers of an HTTP connection. The enumeration 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
if(conn.equals("set-cookie"))
{
value = conn.getHeaderField(i);
}
index++;
}
Solution
The problem has been fixed in the latest firmware versions of the S60 3rd Edition, Feature Pack 1 devices.
| Related Discussions | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| DatagramConnection | maozet | Mobile Java Networking & Messaging & Security | 2 | 2008-05-30 06:21 |
| HTTP Connection Pooling | sharathk | Symbian Networking & Messaging | 1 | 2007-09-04 04:42 |
| bt_gps & gsm_loc simple python app | lda2000 | Python | 2 | 2005-01-18 10:29 |
| SISPATCH format | brain_dead00 | General Symbian C++ | 1 | 2004-07-19 11:44 |
| Problem in using CMdaBitmapScaler in Symbian 7.0 | yogesh14 | Symbian Media (Graphics & Sounds) | 3 | 2005-10-07 04:32 |

