[prev in list] [next in list] [prev in thread] [next in thread] 

List:       httpclient-users
Subject:    Re: HTTP request parser
From:       Jochen Wiedmann <jochen.wiedmann () gmail ! com>
Date:       2019-03-06 9:56:40
Message-ID: CAF8HOZ+ULgVx-KXu0e3Ovbud7w468WqvDA2yYSQoHdYOM7ToQQ () mail ! gmail ! com
[Download RAW message or body]

Thanks very much, Oleg. DefaultHttpRequestParser sounds promising!

Jochen

On Wed, Mar 6, 2019 at 10:18 AM Oleg Kalnichevski <olegk@apache.org> wrote:
> 
> On Wed, 2019-03-06 at 09:50 +0100, Jochen Wiedmann wrote:
> > Whole request, content might be interesting, sooner or later.
> > 
> > Thanks,
> > 
> > Jochen
> > 
> > 
> 
> You can use HttpRequestParser to parse out request heads from an
> arbitrary input stream.
> 
> https://github.com/apache/httpcomponents-core/blob/4.4.x/httpcore/src/test/java/org/apache/http/impl/io/TestRequestParser.java
>  
> 
> In order to get full message parsing you would either need to build a
> custom HttpClientConnection that can be bound to an arbitrary input
> stream directly or use the DefaultBHttpClientConnection and bind it a
> custom Socket that reads data from an arbitrary input stream.
> 
> https://github.com/apache/httpcomponents-core/blob/4.4.x/httpcore/src/main/java/org/apache/http/impl/DefaultBHttpClientConnection.java
>  
> Hope this helps
> 
> Oleg
> 
> > On Wed, Mar 6, 2019, 09:28 Oleg Kalnichevski <olegk@apache.org>
> > wrote:
> > 
> > > On Wed, 2019-03-06 at 00:07 +0100, Jochen Wiedmann wrote:
> > > > Hi,
> > > > 
> > > > I've got a set of files, which basically contain raw HTTP
> > > > requests.
> > > > (I
> > > > obtained them by wiretrapping my own network traffic.)
> > > > 
> > > > Now, I'd like to parse, and validate them. Is there something in
> > > > httpcomponents, that might help me? (Keep in mind, that there
> > > > will
> > > > most likely be stuff like keepalive, etc., so writing my own
> > > > parser
> > > > really isn't appealing.)
> > > > 
> > > > Thanks,
> > > > 
> > > > Jochen
> > > > 
> > > 
> > > Do you want to be able to parse the message head only or the entire
> > > data stream with an enclosed message body?
> > > 
> > > Oleg
> > > 
> > > 
> > > 
> > > -----------------------------------------------------------------
> > > ----
> > > To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> > > For additional commands, e-mail:
> > > httpclient-users-help@hc.apache.org
> > > 
> > > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
> 

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic