[jira] Closed: (NUTCH-3) multi values of header discarded

2006-03-13 Thread Andrzej Bialecki (JIRA)
 [ http://issues.apache.org/jira/browse/NUTCH-3?page=all ]
 
Andrzej Bialecki  closed NUTCH-3:
-

Resolution: Fixed

Fixed in r 376089.

 multi values of header discarded
 

  Key: NUTCH-3
  URL: http://issues.apache.org/jira/browse/NUTCH-3
  Project: Nutch
 Type: Bug
 Reporter: Stefan Groschupf
 Assignee: Stefan Groschupf
  Fix For: 0.8-dev
  Attachments: contentPropertiesAddpatch.txt, multiValuesPropertyPatch.txt

 orignal by: phoebe
 http://sourceforge.net/tracker/index.php?func=detailaid=185group_id=59548atid=491356
 multi values of header discarded
 Each successive setting of a header value deletes the
 previous one.
 This patch allows multi values to be retained, such as
 cookies, using lf cr as a delimiter for each values.
 --- /tmp/HttpResponse.java 2005-01-27
 19:57:55.0 -0500
 +++ HttpResponse.java 2005-01-27 20:45:01.0 -0500
 @@ -324,7 +324,19 @@
 }
 String value = line.substring(valueStart);
 - headers.put(key, value);
 +//Spec allows multiple values, such as Set-Cookie -
 using lf cr as delimiter
 + if ( headers.containsKey(key)) {
 + try {
 + Object obj= headers.get(key);
 + if ( obj != null) {
 + String oldvalue=
 headers.get(key).toString();
 + value = oldvalue +
 \r\n + value;
 + }
 + } catch (Exception e) {
 + e.printStackTrace();
 + }
 + }
 + headers.put(key, value);
 }
 private Map parseHeaders(PushbackInputStream in,
 StringBuffer line)
 @@ -399,5 +411,3 @@
 }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



[jira] Closed: (NUTCH-3) multi values of header discarded

2005-12-17 Thread Jerome Charron (JIRA)
 [ http://issues.apache.org/jira/browse/NUTCH-3?page=all ]
 
Jerome Charron closed NUTCH-3:
--

Fix Version: 0.8-dev
 Resolution: Fixed

Double-Checked Tests (unit and functional).

http://svn.apache.org/viewcvs.cgi?rev=357334view=rev
http://svn.apache.org/viewcvs.cgi?rev=357335view=rev

Tks Stefan.

 multi values of header discarded
 

  Key: NUTCH-3
  URL: http://issues.apache.org/jira/browse/NUTCH-3
  Project: Nutch
 Type: Bug
 Reporter: Stefan Groschupf
 Assignee: Stefan Groschupf
  Fix For: 0.8-dev
  Attachments: multiValuesPropertyPatch.txt

 orignal by: phoebe
 http://sourceforge.net/tracker/index.php?func=detailaid=185group_id=59548atid=491356
 multi values of header discarded
 Each successive setting of a header value deletes the
 previous one.
 This patch allows multi values to be retained, such as
 cookies, using lf cr as a delimiter for each values.
 --- /tmp/HttpResponse.java 2005-01-27
 19:57:55.0 -0500
 +++ HttpResponse.java 2005-01-27 20:45:01.0 -0500
 @@ -324,7 +324,19 @@
 }
 String value = line.substring(valueStart);
 - headers.put(key, value);
 +//Spec allows multiple values, such as Set-Cookie -
 using lf cr as delimiter
 + if ( headers.containsKey(key)) {
 + try {
 + Object obj= headers.get(key);
 + if ( obj != null) {
 + String oldvalue=
 headers.get(key).toString();
 + value = oldvalue +
 \r\n + value;
 + }
 + } catch (Exception e) {
 + e.printStackTrace();
 + }
 + }
 + headers.put(key, value);
 }
 private Map parseHeaders(PushbackInputStream in,
 StringBuffer line)
 @@ -399,5 +411,3 @@
 }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira