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)
              .setIntParameter(CoreConnectionPNames.SOCKET_BUFFER_SIZE,
8 * 1024)
              .setBooleanParameter(CoreConnectionPNames.STALE_CONNECTION_CHECK,
false)
              .setBooleanParameter(CoreConnectionPNames.TCP_NODELAY, true)
              .setParameter(CoreProtocolPNames.ORIGIN_SERVER, "FactSet
Lima Proxy")
              .setParameter(CoreProtocolPNames.PROTOCOL_VERSION,
HttpVersion.HTTP_1_1.toString())
              .setParameter(CoreProtocolPNames.HTTP_ELEMENT_CHARSET,
HTTP.UTF_8);

I then use them to create an AsyncNHttpServiceHandler and
DefaultServerIOEventDispatch.

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?

Thanks...

Bill-

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to