Return-Path: X-Original-To: apmail-hc-dev-archive@www.apache.org Delivered-To: apmail-hc-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 97A24E079 for ; Fri, 11 Jan 2013 22:12:12 +0000 (UTC) Received: (qmail 38478 invoked by uid 500); 11 Jan 2013 22:12:12 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 38407 invoked by uid 500); 11 Jan 2013 22:12:12 -0000 Mailing-List: contact dev-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list dev@hc.apache.org Received: (qmail 38393 invoked by uid 99); 11 Jan 2013 22:12:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Jan 2013 22:12:12 +0000 Date: Fri, 11 Jan 2013 22:12:12 +0000 (UTC) From: "Oleg Kalnichevski (JIRA)" To: dev@hc.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HTTPCORE-325) support custom implementations of SessionInputBuffer and SessionOutputBuffer MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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