Hi,

I've written an app that makes Post requests using an instance of
HttpClient.
My app sometimes talks through a Proxy server using the Digest scheme
and for the most part, succeeds.
The app is not so far off the example in:
http://jakarta.apache.org/httpcomponents/httpclient-3.x/sslguide.html

At the beginning, I set the proxy credentials:

        if (proxyauth != null) {
          client.getState().setProxyCredentials(
            new AuthScope(proxyHost, proxyPort),
            new UsernamePasswordCredentials(proxyauth));
        }

and this allows my app to authenticate with the Proxy server.

My problem came when I watched the packets being sent using Wireshark.
I expected that for new posts after the initial authentication, the
Proxy-Authorization header would always be sent.
Instead, each new post method must re-authenticate, which is completely
unnecessary.

My questions are:
* Does HttpClient support resending of authorization information?
* If it does (I assume it does), how does one make this happen?
* If the default behaviour is to resend, what could I be doing that
causes it to not happen.
  Things that come to mind are:
     - calling PostMethod.setDoAuthentication(true);
     - finishing each post with PostMethod.releaseConnection();
     - Using a new instance of a PostMethod every time (I assumed the
auth info would be a property of the HttpClient);

I'd appreciate any pointers.

Best Regards,

Kevin Crosbie

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to