[ 
https://issues.apache.org/jira/browse/HTTPCORE-112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12531291
 ] 

Roland Weber commented on HTTPCORE-112:
---------------------------------------

Hi Andrea,

unfortunately, it is not that simple. RFC 2616, section 4.2 says:

   Multiple message-header fields with the same field-name MAY be
   present in a message if and only if the entire field-value for that
   header field is defined as a comma-separated list [i.e., #(values)].
   It MUST be possible to combine the multiple header fields into one
   "field-name: field-value" pair, without changing the semantics of the
   message,...

So all these examples are semantically equivalent:

a)
Connection: proxy-connection
Connection: close
Connection: keep-alive

b)
Connection: proxy-connection, close, keep-alive

c)
Connection: proxy-connection
Connection: close, keep-alive

d)
Connection: proxy-connection, close
Connection: keep-alive

This is a common problem with other comma-separated headers, too. That's why I 
am wondering whether we should have a TokenIterator of some sort that scans all 
headers of a given name for comma-separated tokens. At least plain tokens as 
defined in RFC 2616, section 2.2 don't require quote and escape handling. That 
would get really nasty.

cheers,
  Roland


> DefaultConnectionReuseStrategy misinterprets Connection header
> --------------------------------------------------------------
>
>                 Key: HTTPCORE-112
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-112
>             Project: HttpComponents Core
>          Issue Type: Bug
>          Components: HttpCore
>    Affects Versions: 4.0-alpha5
>            Reporter: Roland Weber
>            Priority: Minor
>             Fix For: 4.0-beta1
>
>         Attachments: multiuconn.patch
>
>
> DefaultConnectionReuseStrategy assumes that "Connection:" is a single-valued 
> header.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to