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

List:       httpclient-users
Subject:    Re: Http_1_1 and strict-transfer-encoding using client 4.3
From:       Maxim Solodovnik <solomax666 () gmail ! com>
Date:       2015-03-10 16:33:56
Message-ID: CAJmbs8haw9jgnUZTALxpE-Eh38CNKr9sM+H4gYCmP98b7TWWAA () mail ! gmail ! com
[Download RAW message or body]


Thanks a lot!
Makes a lot of sense!

On Tue, Mar 10, 2015 at 10:13 PM, Oleg Kalnichevski <olegk@apache.org>
wrote:

> On Tue, 2015-03-10 at 21:28 +0600, Maxim Solodovnik wrote:
> > Hello,
> >
> > Thanks for the 4.4 release
> >
> > Am I right thinking this:
> > method = new HttpGet(...);
> > method.getParams().setParameter("http.protocol.strict-transfer-encoding",
> > Boolean.TRUE);
> > is the default behavior in 4.4?
> >
> >
>
> Maxim
>
> This parameter effectively has no effect since version 4.3. Core
> transport components use a strict strategy for outgoing messages and a
> lax strategy for incoming messages by default. See
> LaxContentLengthStrategy and StrictContentLengthStrategy.
>
> This parameter has been deprecated and is just simply ignored. If you
> need to customize content delineation logic you should create a custom
> ContentLengthStrategy implementation.
>
> Hope this helps
>
> Oleg
>
> > On Thu, Sep 25, 2014 at 7:50 PM, Maxim Solodovnik <solomax666@gmail.com>
> > wrote:
> >
> > > Thanks, will wait for 4.4
> > >
> > > On 25 September 2014 19:46, Oleg Kalnichevski <olegk@apache.org>
> wrote:
> > >
> > >> On Thu, 2014-09-25 at 19:31 +0700, Maxim Solodovnik wrote:
> > >> > Thanks for the clarification
> > >> >
> > >> > Could you please provide example or maybe a hint of how to use
> "Custom
> > >> > content length strategy"?
> > >> > I have tried this one [1] and found it not compilable
> > >> > Another example (I'm unable to find right now) was too complicated:
> > >> lots of
> > >> > code was written (creating and using DefaultBHttpClientConnection).
> I
> > >> > wonder if there any simplier way to achieve this?
> > >> >
> > >>
> > >> It turned out I had forgotted to add an optional constructor to
> > >> ManagedHttpClientConnectionFactory in 4.3. Now it will have to wait
> > >> until 4.4.
> > >>
> > >>
> > >>
> https://github.com/apache/httpclient/commit/0f227fa940598c7d5c64b9b7f4dcfe70dfa3da31
> > >>
> > >> Essentially this is how it is supposed to work.
> > >> ---
> > >> ManagedHttpClientConnectionFactory connFactory = new
> > >> ManagedHttpClientConnectionFactory(...);
> > >> PoolingHttpClientConnectionManager cm = new
> > >> PoolingHttpClientConnectionManager(connFactory);
> > >> ---
> > >>
> > >> For now you will have to build a custom
> HttpConnectionFactory<HttpRoute,
> > >> ManagedHttpClientConnection> implementation.
> > >>
> > >> Oleg
> > >>
> > >>
> > >>
> > >>
> > >> ---------------------------------------------------------------------
> > >> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> > >> For additional commands, e-mail: httpclient-users-help@hc.apache.org
> > >>
> > >>
> > >
> > >
> > > --
> > > WBR
> > > Maxim aka solomax
> > >
> >
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
>
>


-- 
WBR
Maxim aka solomax


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

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