HttpRedirectHandler, redir to a relative URL doesn't work
Status: Beta
Brought to you by:
sonalb
Some sites use an invalid(?) location when server-side redirecting. Say the site is http://www.bbb.com/redir.asp
it could attempt to redirect to target.asp by returning location: target.asp (relative URL) instead of http://www.bbb.com/redir.asp (absolute URL)
HttpRedirectHandler will throw a 'no protocol' MalformedUrlException in this case.
The solution? Manually stick the prefix of the URL to the location. See attached patch file.
Patch for HttpRedirectHandler