hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roland Weber <http-as...@dubioso.net>
Subject Re: invalid redirect
Date Wed, 05 Jul 2006 18:02:31 GMT
Hello,

> Could you please explain, how would I deal with relative URIs, may be there is
> simple way to validate if the URI is relative and how to handle it?

The HttpClient URI class as well as the JDK URI and URL classes have
constructors that deal with relative URLs. For example this one:
http://jakarta.apache.org/commons/httpclient/apidocs/org/apache/commons/httpclient/URI.html#URI(org.apache.commons.httpclient.URI,%20java.lang.String,%20boolean)

Pass in the target URL of the request as the base URL.

hope that helps,
  Roland


---------------------------------------------------------------------
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