DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=35376>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=35376 [EMAIL PROTECTED] changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |INVALID ------- Additional Comments From [EMAIL PROTECTED] 2005-06-15 22:59 ------- Wenwei, Actually things are not that simple as I initially thought. After having dug a little deeper I have come to believe the problem is actually at the server side. The culprit appears to be either the Netscape-Enterprise server or a CGI script that issues redirects without taking into account that virtual hosts are not meant to be case sensitive. HttpClient, to the contrary, does not differentiate between WWW.NETWORKSOLUTIONS.COM and www.networksolutions.com host names. It treats them as the same address (quite correctly) and reuses the same connection, which in its turn causes HttpMethodBase#addHostRequestHeader method to generate exactly the same "Host" request header as before >> "Host: WWW.NETWORKSOLUTIONS.COM[\r][\n]" Possible workaround would be to always convert host names to lower case when generating "Host" request headers, but this is certainly not something I would want to include into the stock version of HttpClient Hope this explains it Oleg Index: /home/oleg/src/apache.org/jakarta-commons/httpclient-trunk/src/java/org/apache/commons/httpclient/HttpMethodBase.java =================================================================== --- /home/oleg/src/apache.org/jakarta-commons/httpclient-trunk/src/java/org/apache/commons/httpclient/HttpMethodBase.java (revision 180130) +++ /home/oleg/src/apache.org/jakarta-commons/httpclient-trunk/src/java/org/apache/commons/httpclient/HttpMethodBase.java (working copy) @@ -1223,7 +1223,7 @@ if (host != null) { LOG.debug("Using virtual host name: " + host); } else { - host = conn.getHost(); + host = conn.getHost().toLowerCase(); } int port = conn.getPort(); -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
