Handle redirection to relative url's in the Location: header of http
authorhalex <halex@openbsd.org>
Fri, 23 Jul 2010 22:27:16 +0000 (22:27 +0000)
committerhalex <halex@openbsd.org>
Fri, 23 Jul 2010 22:27:16 +0000 (22:27 +0000)
commitd0204f9078ef719e9bffb4df200699d53e5e314d
tree9ffe641339762e27e0e6eedeae704aea7c7435e8
parent08c6bd69794f3ca932c28ce474c0af68b7ec47ce
Handle redirection to relative url's in the Location: header of http
responses. Yes, they are violating the rfc's. Yes they do exist anyway.

Also fix a memory leak when url_encode fails to malloc, by simply
err'ing out if so.

feedback and ok phessler@
usr.bin/ftp/fetch.c