hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jochen Wiedmann <jochen.wiedm...@gmail.com>
Subject Re: HTTP request parser
Date Wed, 06 Mar 2019 09:56:40 GMT
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


Mime
View raw message