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

Roland Weber commented on HTTPCORE-110:
---------------------------------------

The point is to properly encapsulate parsing logic currently replicated in 
three different places, in order to make the code better maintainable and to 
allow easy plugging in of alternative parse logic, if someone should have a 
need for that. With this change, the parsing logic becomes fully independent of 
the transport: traditional IO, NIO, email, files on disk, streams of logging 
data, or whatever. You write one piece of code that reads the message line by 
line and feeds it to the parser. The parser takes care of _all_ the parsing, 
and _only_ the parsing. Tests for that parser will be valid for all transports.
What is the point of having the header continuation parsing implemented in 
three different places?

cheers,
  Roland

> refactor message parsing and formatting, step 2
> -----------------------------------------------
>
>                 Key: HTTPCORE-110
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-110
>             Project: HttpComponents Core
>          Issue Type: Improvement
>          Components: HttpCore
>    Affects Versions: 4.0-alpha5
>            Reporter: Roland Weber
>            Assignee: Roland Weber
>             Fix For: 4.0-alpha6
>
>         Attachments: 2k7-08-20-parser-1.txt, 2k7-08-23-parser-2.txt
>
>
> The line-level parsing and formatting for HTTP messages is spread across 
> static helper methods in o.a.h.message. Refactor the code to allow for easy 
> replacement of these parser and formatter elements, which are used by both 
> core and NIO.
> Ideally, handling of header continuation lines, which is currently still 
> implemented in specific parsers for blocking and NIO, could be factored out 
> too. That would require a stateful parser.

-- 
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