Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0002637 [Resin] crash always 04-29-08 17:46 05-12-08 13:25
Reporter remilon View Status public  
Assigned To ferg
Priority normal Resolution fixed  
Status closed   Product Version 3.1.5
Summary 0002637: HttpProxyServlet doesn't pass headers correctly
Description We tried out using HttpProxyServlet to proxy requests to a backend legacy server that is setting multiple cookies. However, a response that leaves the backend looking something like this:

HTTP/1.x 200 OK
Set-Cookie: A=1; path=/; domain=example.com
Set-Cookie: B=2; path=/; domain=example.com
Set-Cookie: C=3; path=/; domain=example.com
Content-Language: en-US
Expires: Thu, 01 Nov 2007 21:15:45 GMT
Content-Encoding: gzip
Content-Type: text/html; charset=ISO-8859-1
Content-Length: 7462
Date: Wed, 30 Apr 2008 00:35:50 GMT

Arrives at the client looking something like this:

HTTP/1.x 200 OK
Set-Cookie: C=3; path=/; domain=example.com
Content-Language: en-US
Expires: Thu, 01 Nov 2007 21:15:45 GMT
Content-Encoding: gzip
Content-Type: text/html; charset=ISO-8859-1
Content-Length: 7462
Date: Wed, 30 Apr 2008 00:35:50 GMT

Digging in to the source a bit, it looks like the underlying HttpStream uses a HashMap to keep header values, thus overwriting headers with the same name. Also, although we only saw it with Set-Cookie, this would make any multi-line headers not function properly.
Additional Information
Attached Files

- Relationships

- Notes
(0003028)
remilon
04-29-08 18:02

It looks like the same HttpStream is used for the request and response, so headers on multiple lines coming from the client would also be overwritten.
 
(0003047)
ferg
05-12-08 13:25

server/196{b,c}
 

- Issue History
Date Modified Username Field Change
04-29-08 17:46 remilon New Issue
04-29-08 18:02 remilon Note Added: 0003028
04-30-08 11:53 remilon Issue Monitored: remilon
05-12-08 13:25 ferg Note Added: 0003047
05-12-08 13:25 ferg Assigned To  => ferg
05-12-08 13:25 ferg Status new => closed
05-12-08 13:25 ferg Resolution open => fixed
05-12-08 13:25 ferg Fixed in Version  => 3.1.7
09-03-08 12:58 ksullivan Issue Monitored: ksullivan
09-07-08 11:34 ksullivan Issue End Monitor: ksullivan


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