Namespaces
Variants
Actions

Archived:Panic in S60 3rd Edition FP1 devices if the Set-Cookie header is empty (Known Issue)

Jump to: navigation, search
Archived.png
Archived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.


SignpostIcon Wifi 52.png
Article Metadata

Compatibility
Platform(s): S60 3rd Edition FP1

Article
Created: User:Technical writer 1 (04 Jul 2007)
Last edited: hamishwillee (28 Jun 2012)

Description

On Nokia S60 3rd Edition FP1 phones and emulator, the USER 44 or USER 45 panic is thrown while connecting to a remote server. The error is based on low-level parsing of the response which is caused by an empty Set-Cookie property in the header. If the header is removed or set to a non-empty string, no panic is raised and the application works fine.

How to reproduce

Build a dummy servlet with the Set-Cookie header set to an empty string:

protected void processRequest(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
String test="Testing...";
response.setContentType(content_type);
int length = test.getBytes().length;
response.setContentLength(length);
response.setHeader("Set-Cookie", "");
PrintWriter out = response.getWriter();
out.println(test);
out.close();
}

Solution

Do not leave the Set-Cookie header empty.

Set-Cookie: \r\n -- crash
Set-Cookie: foo\r\n -- no crash
Set-Cookie: foo=bar\r\n -- no crash
This page was last modified on 28 June 2012, at 07:23.
88 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