hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Kalnichevski (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HTTPCORE-325) support custom implementations of SessionInputBuffer and SessionOutputBuffer
Date Fri, 11 Jan 2013 22:12:12 GMT

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

Oleg Kalnichevski commented on HTTPCORE-325:
--------------------------------------------

> I guess it would mean pushing the *Impl methods that BHttpConnectionBase uses into the
Session*Buffer interfaces

Noah,
We can't do that or we would end up breaking API compatibility with earlier versions of HttpCore.
We would have to create an extended interface of some sort which is doable but quite ugly.
More importantly, though, I am not convinced it is necessary. In your particular case you
could determine the total length of the message head by summing up the length of each individual
line (SessionInputBuffer#readLine method returns the number of bytes read into the CharArrayBuffer,
which should be sufficient without having to change the underlying implementation of SessionInputBuffer)
or in the worst case re-parsing the message head and do the necessary counting after the message
has been fully retrieved. I really do think your should approach the problem form a different
angle.

Oleg
                
> support custom implementations of SessionInputBuffer and SessionOutputBuffer
> ----------------------------------------------------------------------------
>
>                 Key: HTTPCORE-325
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-325
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>    Affects Versions: 4.3-alpha2
>            Reporter: Noah Levitt
>         Attachments: httpcore-325-20121231182846.diff
>
>
> In heritrix we have a set of classes that wrap streams and record them verbatim for replay.
One of the things it needs to do is make a note of where the http headers end and the message
body begins. In order to make this work with httpcomponents I found I needed custom implementations
of Session*Buffer. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message