Hi
In org.apache.http.impl.client.DefaultRedirectHandler's getLocationURI
method, the location URI is adjusted if
ClientPNames.REJECT_RELATIVE_REDIRECT is false. However there are 'evil'
cases where the location header value does not start with a '/'. So
the resulting URI looks like
http://www.example.orgfoo.bar
instead of
http://www.example.org/foo.bar
. Do you think, this should also be part of the adjustment?
Something like
String path = uri.getPath().startsWith("/") ? uri.getPath() : "/" +
uri.getPath();
uri = new URI(target.getSchemeName(), null, target.getHostName(),
target.getPort(), path, uri.getQuery(), uri.getFragment());
should do the job.
--
Johannes Koch
BIKA Web Compliance Center - Fraunhofer FIT
Schloss Birlinghoven, D-53757 Sankt Augustin, Germany
Phone: +49-2241-142628 Fax: +49-2241-142065
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]