Namespaces
Variants
Actions

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

Jump to: navigation, search
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 page was last modified on 16 August 2012, at 14:11.
165 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved