hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill Speirs <bill.spe...@gmail.com>
Subject HttpParams appear to be static/global
Date Wed, 24 Aug 2011 14:28:08 GMT
I'm working on a proxy server using the 4.2-alpha1 httpcore and 4.1.2
httpclient. In the server portion of my code I setup
SyncBasicHttpParams as follows:

        HttpParams params = new SyncBasicHttpParams();

        params.setIntParameter(CoreConnectionPNames.SO_TIMEOUT, 0)
8 * 1024)
              .setBooleanParameter(CoreConnectionPNames.TCP_NODELAY, true)
              .setParameter(CoreProtocolPNames.ORIGIN_SERVER, "FactSet
Lima Proxy")

I then use them to create an AsyncNHttpServiceHandler and

In another portion of code I create a new SyncBasicHttpParams object
and use it to configure my client:
		final HttpParams params = new SyncBasicHttpParams();

		params.setBooleanParameter(ClientPNames.HANDLE_REDIRECTS, handleRedirects);
		params.setBooleanParameter(ClientPNames.ALLOW_CIRCULAR_REDIRECTS, false);
		params.setParameter(ClientPNames.COOKIE_POLICY, CookiePolicy.IGNORE_COOKIES);
		HttpConnectionParams.setSoTimeout(params, maxTimeout);
		HttpConnectionParams.setConnectionTimeout(params, maxTimeout);
		this.client = new DefaultHttpClient(this.connManager, params);

However, for some reason the HTTP_ELEMENT_CHARSET parameter is
"bleeding" over from my server into my client, forcing my client
requests to be in UTF-8 as well.

Why is this happening? Are the settings for SyncBasicHttpParams global somehow?



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

View raw message