[xml] Relative HTTP redirects



xmlNanoHTTP makes no attempt to follow http redirects if the url in the
'Location:' header is relative.  Attached is a patch that fixes it. 
It's true that returning a relative url in a location header violates
HTTP.  Unfortunately, it seems this practice is encouraged in the IIS
camp.  

If you guys decide to not commit it, how about changing the error
message?  right now it just outputs an "Unknown IO error", with
DEBUG_HTTP enabled, as it doesn't understand the url its trying to fetch
is incomplete.  I'd be happy to take a look at that, could someone let
me know the proper way to output errors from inside the lib?

Thanks,

Ian Hummel

Attachment: relative_url.diff
Description: Text Data



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]