Yeah, it's not the best semantics maybe. Just try not to reuse the HC object with a new request. The client effectively changes the HC and re-executes the request on a redirect instead of creating a new one. See it as a possibility for you to read from the HC object after the request returns. Maybe a note in the API docs of the HC could avoid this kind of misuse.

Hope that helps

Ortwin

Bruno Borges wrote:
Ortwin, I enabled the wire log and discovered that the
HostConfiguration object was been changed after a redirect location is
sent back from the server. The page gives a error and HttpClient
follow the redirection header to the website in 'http' protocol, not
anymore 'https' as the HostConfiguration was constructed before.

I'm changing the code to 'setFollowRedirects(false)' but I'm not sure
if this should be the best way to fix this problem. Shouldn't the
HostConfiguration object never be changed by the HttpClient instance ?
The GetMethod was redirected, but HC should stay the same.

Thank you


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

Reply via email to