hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Warren Bell <warrenbe...@gmail.com>
Subject Re: HttpClient in a proxy servlet
Date Fri, 10 Feb 2012 16:50:29 GMT
Oleg,

I am looking at the source code for DefaultHttpClient and thinking that
I should just extend AbstractHttpClient myself and configure it in a
striped down version. I see the two methods
setDefaultHttpParams(HttpParams params) and createHttpProcessor() and
that these methods are adding params and interceptors.

Can I write a version of setDefaultHttpParams(HttpParams params) that
does not add any parameters and relies only on the parameters I add to
the request ?

Can I overide createHttpProcessor() and just add the bare minimum of
interceptors needed, and if so what interceptors should I include ?

Or, am I going about this the wrong way completely. I am counting on the
client's browser in front of my proxy to get the request correct. I just
want to pass the request on to HttpClient the way it came from the
client's browser.


Thanks,

Warren Bell

On 2/10/12 3:05 AM, Oleg Kalnichevski wrote:
> On Thu, 2012-02-09 at 20:26 -0800, Warren Bell wrote:
>> I am using HttpClient in a proxy servlet and I want to configure it so
>> that it does not handle redirects automatically or add any request
>> headers or request entities. I will be passing all request headers and
>> request entities to it.
>>
>> What is the best way to configure HttpClient to act like a proxy ?
>>
>> Thanks,
>>
>> Warren Bell
>>
> 
> You should certainly want to disable automatic redirect handling. You
> might as well disable authentication and cookie management.
> 
> Hope this helps
> 
> 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


Mime
View raw message