You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nutch.apache.org by "Stefan Grroschupf (JIRA)" <ji...@apache.org> on 2005/02/20 23:17:53 UTC

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

multi values of header discarded
--------------------------------

         Key: NUTCH-3
         URL: http://issues.apache.org/jira/browse/NUTCH-3
     Project: Nutch
        Type: Bug
    Reporter: Stefan Grroschupf


orignal by: phoebe
http://sourceforge.net/tracker/index.php?func=detail&aid=1111185&group_id=59548&atid=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.000000000 -0500
+++ HttpResponse.java 2005-01-27 20:45:01.000000000 -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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


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

Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/NUTCH-3?page=comments#action_12360665 ] 

Doug Cutting commented on NUTCH-3:
----------------------------------

I find the naming confusing, where setProperty adds a value.  I wonder whether we should provide a 'setProperty' that replaces all values, and have 'addProperty' just add a single value?  Would such a 'setProperty' ever be useful?

> 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=detail&aid=1111185&group_id=59548&atid=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.000000000 -0500
> +++ HttpResponse.java 2005-01-27 20:45:01.000000000 -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] Updated: (NUTCH-3) multi values of header discarded

Posted by "Stefan Groschupf (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/NUTCH-3?page=all ]

Stefan Groschupf updated NUTCH-3:
---------------------------------

    Attachment: contentPropertiesAddpatch.txt

Better?

> 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=detail&aid=1111185&group_id=59548&atid=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.000000000 -0500
> +++ HttpResponse.java 2005-01-27 20:45:01.000000000 -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] Commented: (NUTCH-3) multi values of header discarded

Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/NUTCH-3?page=comments#action_12360702 ] 

Doug Cutting commented on NUTCH-3:
----------------------------------

Yes, I prefer this.  +1

> 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=detail&aid=1111185&group_id=59548&atid=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.000000000 -0500
> +++ HttpResponse.java 2005-01-27 20:45:01.000000000 -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] Updated: (NUTCH-3) multi values of header discarded

Posted by "Stefan Groschupf (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/NUTCH-3?page=all ]

Stefan Groschupf updated NUTCH-3:
---------------------------------

    Attachment: multiValuesPropertyPatch.txt

Attached a patch that adds a getProperties method to the ContentProperties class to receive a string array of values for a given key. 
Now it is possible setting many values for a key but still  getting the last set value using get or getProperty methods.
Since meta data can have now multiple values for a key it was necessary to change the content serialization methods as well. 
To hold thing simple ContentProperties now also implements the Writable interface.
Patch comes with a test and hopefully all classes :). The nutch testsuite complete pass on my box, but please double check - thanks!


> 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
>  Attachments: multiValuesPropertyPatch.txt
>
> orignal by: phoebe
> http://sourceforge.net/tracker/index.php?func=detail&aid=1111185&group_id=59548&atid=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.000000000 -0500
> +++ HttpResponse.java 2005-01-27 20:45:01.000000000 -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

Posted by "Andrzej Bialecki (JIRA)" <ji...@apache.org>.
     [ 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=detail&aid=1111185&group_id=59548&atid=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.000000000 -0500
> +++ HttpResponse.java 2005-01-27 20:45:01.000000000 -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] Assigned: (NUTCH-3) multi values of header discarded

Posted by "Stefan Groschupf (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/NUTCH-3?page=all ]

Stefan Groschupf reassigned NUTCH-3:
------------------------------------

    Assign To: Stefan Groschupf

> 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

>
> orignal by: phoebe
> http://sourceforge.net/tracker/index.php?func=detail&aid=1111185&group_id=59548&atid=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.000000000 -0500
> +++ HttpResponse.java 2005-01-27 20:45:01.000000000 -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

Posted by "Jerome Charron (JIRA)" <ji...@apache.org>.
     [ 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=357334&view=rev
http://svn.apache.org/viewcvs.cgi?rev=357335&view=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=detail&aid=1111185&group_id=59548&atid=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.000000000 -0500
> +++ HttpResponse.java 2005-01-27 20:45:01.000000000 -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] Commented: (NUTCH-3) multi values of header discarded

Posted by "Stefan Groschupf (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/NUTCH-3?page=comments#action_12360667 ] 

Stefan Groschupf commented on NUTCH-3:
--------------------------------------

... the ideas was to leasve api as it is, just add a new getProperties method.
Should we now in general replace setProperty and getProperty with addProperty and getProperties or  leave these for single property values? In case we leave set and get property should addProperty than overwrite the  value setted with setProperty?
:-? 

> 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=detail&aid=1111185&group_id=59548&atid=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.000000000 -0500
> +++ HttpResponse.java 2005-01-27 20:45:01.000000000 -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] Commented: (NUTCH-3) multi values of header discarded

Posted by "Stefan Groschupf (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/NUTCH-3?page=comments#action_12360658 ] 

Stefan Groschupf commented on NUTCH-3:
--------------------------------------

Thanks. :)

> 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=detail&aid=1111185&group_id=59548&atid=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.000000000 -0500
> +++ HttpResponse.java 2005-01-27 20:45:01.000000000 -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] Commented: (NUTCH-3) multi values of header discarded

Posted by "Stefan Groschupf (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/NUTCH-3?page=comments#action_12360666 ] 

Stefan Groschupf commented on NUTCH-3:
--------------------------------------

No problem, I can easily change this, but this will effect a lot of code. Just give me some hours.  I will do aginst the svn since it already in the svn. 

> 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=detail&aid=1111185&group_id=59548&atid=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.000000000 -0500
> +++ HttpResponse.java 2005-01-27 20:45:01.000000000 -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] Reopened: (NUTCH-3) multi values of header discarded

Posted by "Stefan Groschupf (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/NUTCH-3?page=all ]
     
Stefan Groschupf reopened NUTCH-3:
----------------------------------


improvement Doug suggested....

> 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=detail&aid=1111185&group_id=59548&atid=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.000000000 -0500
> +++ HttpResponse.java 2005-01-27 20:45:01.000000000 -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