hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: Why does HttpClient.executeMethod() reset the host config if URI is absolute?
Date Sat, 03 Feb 2007 18:07:11 GMT
On 03/02/07, Roland Weber <http-async@dubioso.net> wrote:
> Hi Sebastian,
>
> > I would have thought it was safe to allow the protocol to propagate,
> > so long as it was for the same scheme?
>
> It is hard to tell for what reason design decisions were made at the
> time. HostConfiguration is mostly used to specify a proxy, and all
> other required fields are just filled in from an absolute URI. Only
> if the URI is not absolute will the fields set manually take effect.
>
> I'm unable to tell what effect a change in this behavior would have
> on existing applications. I've learned recently that the scheme name
> is a bad attribute for identifying protocols, since you might have
> registered a protocol with id "https" for name "http" because you
> want to implicitly change an application's behavior to https.

Good point.

> I don't feel like touching anything in this area of the 3.x code,
> but I won't argue if somebody with more insight agrees with you.
> In the past, it happened maybe twice since I'm on the list that a
> user stumbled over this behavior, and we never did more than tell
> them it will work only for relative URIs.
>
> If you just cut off the "https:" part of the URI, you should see
> the protocol you've set take effect.

Thanks, I'll give it a try.

> cheers,
>  Roland
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


Mime
View raw message