Mantis Bugtracker

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0002900 [Resin] major always 09-04-08 02:02 09-19-08 11:12
Reporter ksullivan View Status public  
Assigned To ferg
Priority high Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 3.2.1 Product Version 3.1.7
  Product Build
Summary 0002900: Repeated headers not passed in response
Description Issue 2637 reports that the bug with repeated header names going from the client to the Origin Server are passed - this seems to work in 3.1.7. It is also reported that repeated headers, e.g. Set-Cookie headers are passed on the way back from the Origin Server to the client. This does not seem to be working in 3.1.7.

The code (from file that deals with passing the headers back in the response is (irrelevant stuff snipped):
      Iterator iter = rs.getAttributeNames();
      while (iter.hasNext()) {
    String name = (String);
      res.addHeader(name, (String) rs.getAttribute(name));

rs.getAttributeNames() only returns one instance of each header name. Even if it didn't, rs.getAttribute(name) would only be able to return one of the values assigned to the header.
Steps To Reproduce
Additional Information
Attached Files [^] (19,647 bytes) 09-07-08 10:55

- Relationships

- Notes
09-05-08 02:12

This is a high priority blocking issue for us. Is someone able to look at this? I even have the code that needs inserted into to implement this fix.
09-07-08 11:03

Attached is the patched version of to implement a fix for this issue. That file goes in: resin-3.1.7/modules/util/src/com/caucho/vfs. The code change to is given here:

Replace Line 213: res.addHeader(name, (String) rs.getAttribute(name));
Object value = rs.getAttribute(name);
if (value instanceof String[]) {
    String []values = (String []) value;
    for (int i = 0; i < values.length; i++) {
        res.addHeader(name, values[i]);
else {
    res.addHeader(name, (String)value);

- Issue History
Date Modified Username Field Change
09-04-08 02:02 ksullivan New Issue
09-04-08 06:18 ksullivan Issue Monitored: ksullivan
09-05-08 02:12 ksullivan Note Added: 0003391
09-07-08 10:55 ksullivan File Added:
09-07-08 11:03 ksullivan Note Added: 0003406
09-09-08 10:40 ferg Priority normal => high
09-19-08 11:12 ferg Assigned To  => ferg
09-19-08 11:12 ferg Status new => closed
09-19-08 11:12 ferg Resolution open => fixed
09-19-08 11:12 ferg Fixed in Version  => 3.2.1

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