Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003897 [Resin] major always 02-19-10 22:09 01-17-11 12:05
Reporter ykim View Status public  
Assigned To ferg
Priority normal Resolution fixed  
Status closed   Product Version 3.1.6
Summary 0003897: resin doesn't parse cookie value that is space delimited
Description We are migrating legacy application from websphere to resin. The application is using cookie value that is space delimited - let's say "A B C"

With resin's servlet implementation, when you invoke getCookies() and retrieve the value, it only gets "A" and the remaining part of the value gets truncated.

I don't recall seeing any restrictions on the format of a value. I'm adding a sample jsp code that simulates it in the additional information.
Additional Information <%@ page import="javax.servlet.http.*" %>
<%@ page import="org.apache.commons.lang.StringUtils" %>

<script lang="javascript">
   //document.cookie = 'mycookie' + "=" + escape('a b c');
   document.cookie = 'mycookie' + "=" + 'a b c';
</script>

<%
        Cookie[] cookies = request.getCookies();

        out.println("cookie length = " + cookies.length);
        if (cookies != null) {
            for (int i = 0; i < cookies.length; i++) {
                String value = cookies[i].getValue();
                out.println(cookies[i].getName() + " = " + value);
            }   
        }   

        String[] cookieData = StringUtils.split(cookies[1].getValue(), ' ');
        for (int i = 0; i < cookieData.length; i++ ) {
            out.println("cookie value = " + cookieData[i]);
        }
%>

Attached Files

- Relationships

- Notes
(0004944)
ferg
01-17-11 12:05

server/010y
 

- Issue History
Date Modified Username Field Change
02-19-10 22:09 ykim New Issue
09-15-10 18:44 reza Severity minor => major
01-17-11 12:05 ferg Note Added: 0004944
01-17-11 12:05 ferg Assigned To  => ferg
01-17-11 12:05 ferg Status new => closed
01-17-11 12:05 ferg Resolution open => fixed
01-17-11 12:05 ferg Fixed in Version  => 4.0.15


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
30 total queries executed.
27 unique queries executed.
Powered by Mantis Bugtracker