[ 
http://issues.apache.org/jira/browse/HTTPCLIENT-580?page=comments#action_12412499
 ] 

Ortwin Glück commented on HTTPCLIENT-580:
-----------------------------------------

The request line you see is probably 
GET /2C/27C8847D1C2D67C09FC7B4D53B43FB.jpg HTTP/1.1

Note the ommitted "i".

This is because the URI is interpreted as a relative URI according to RFC 2396, 
Section 5.
It starts with double slash and thus is a "net_path": net_path      = "//" 
authority [ abs_path ]

You see that a net_path contains an authority part which in your case is the 
"i" and which is (correctly) not included in the request line.

So the URI classes behave correctly so far.

The problem is that your URI is not a net_path really. And you must make this 
fact clear by providing the GetMethod with the complete URI including scheme 
and authority part:

String uri = "http://stb.msn.com//i/2C/27C8847D1C2D67C09FC7B4D53B43FB.jpg";;
GetMethod get = new GetMethod(uri); 


> HttpMethodBase can not handle specific URIs in www.msn.com
> ----------------------------------------------------------
>
>          Key: HTTPCLIENT-580
>          URL: http://issues.apache.org/jira/browse/HTTPCLIENT-580
>      Project: Jakarta HttpClient
>         Type: Bug

>   Components: HttpClient
>     Versions: 3.0 Final
>  Environment: Windows XP, JDK 1.5
>     Reporter: Joe Lin

>
> It seems that HttpClient can not handle the following URLs that is in 
> www.msn.com page:
> http://stb.msn.com//i/2C/27C8847D1C2D67C09FC7B4D53B43FB.jpg
> Notice the double slashes after the host part of the URL. 
> I created a GetMethod
> String uri = "//i/2C/27C8847D1C2D67C09FC7B4D53B43FB.jpg
> ";
> GetMethod get = new GetMethod(uri);
> I then invoke 
> client.executeMethod with a the host of HostConfiguration being set at 
> stb.msn.com
> Somehow the setURI(URI uri) method in HttpMethodBase does not set it 
> correctly.  And the actual request sent out from HttpClient becomes 
> http://stb.msn.com/i/2C/27C8847D1C2D67C09FC7B4D53B43FB.jpg. Noticed the 
> double slashes in the original request now becomes a single slash and I got a 
> 404.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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

Reply via email to