commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "h2ooo x" <tj...@hotmail.com>
Subject [HttpClient] Relative URI
Date Tue, 19 Oct 2004 01:29:23 GMT
>From the HTML, I grabbed the line src="member/login" and sent a request to 
it and, the response said "400 Bad Request".

The problem is solved by adding a prefix to the address like this, 
"/member/login":

   // uri = "member/login"
   if (uri.charAt(0) != '/')
      uri = "/" + uri;

   // uri = "/member/login"


Do we have to do this programmatically?
* I'm afraid if I have overlooked some useful HttpClient features to make 
the code better.

_________________________________________________________________
Are you in love? Find a date on MSN Personals http://match.msn.com.my/


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


Mime
View raw message