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

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

Hi Oleg,

I didn't want to tie the token iteration into the parser framework. The 
parser/formatter framework is meant for customizing the behaviour of our core 
framework, not for twisting application behavior. I consider even the 
HeaderElementsParser that is set by the parsing framework in BufferedHeader as 
a default that applications can choose to override at any time. BufferedHeader 
has a public setter for the HEP. By the way, how do you feel about lifting that 
to the interface, so it can be used on plain headers too?
I'm also not too fond of the (indexFrom, indexTo) style of the parsers. There 
are some situations where data has to be parsed twice, by different code, 
because the caller has to determine the indexTo for the actual parsing method. 
It's not a critical issue and would be extremely laborious to change, so I left 
it as it is when refactoring the parsing code.

I wanted to let applications simply instantiate the token iterator of their 
choice. Much like the StringTokenizer:

interface o.a.h.TokenIterator;
class o.a.h.message.BasicTokenIterator implements TokenIterator {
   public TokenIterator(HeaderIterator hit) {...}
}

I've met with a few annoyances this week and will do some anger management 
hacking this evening. That will suffice for the HeaderIterator and changes to 
HttpMessage interface. The TokenIterator and HeaderElementIterator (can we 
shorten that to ElementIterator?) are add-ons that don't break the API, so they 
are less urgent. I can deliver a TokenIterator by Saturday evening, if you want 
to delay the release until Sunday.

Andrea, would you like to take care of the ElementIterator? It doesn't need to 
go into the alpha, from my point of view.

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