You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Roland Weber (JIRA)" <ji...@apache.org> on 2007/08/20 13:21:32 UTC

[jira] Updated: (HTTPCORE-110) refactor message parsing and formatting, step 2

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

Roland Weber updated HTTPCORE-110:
----------------------------------

    Attachment: 2k7-08-20-parser-1.txt

Here's a first step that should allow to form an opinion on my approach. Various static parse methods are moved to two dedicated classes. The old static code is still in there, and I've hacked in some places to avoid more excessive changes before review. In particular, the footer processing in ChunkedInputStream still calls a static method. The header continuation line parsing is not addressed by this patch. Parameterization of connections is also not addressed, the default instances of the new parser classes are used.

I believe that this design does not produce more garbage than the static version. I would prefer linear parsing based on a class or interface like java.text.ParsePosition instead of the toIndex currently used, but that is a separate issue.

Please let me know what you think.

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
>
>
> 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: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org