Bugfix for httpd proxy feature
Jim Knopf
osm-berlin at firemail.de
Fri Jul 6 13:46:27 UTC 2018
Hello list,
the httpd applet's proxy feature has glitches. The promise is, quote
P:/url:[http://]hostname[:port]/new/path
# When /urlXXXXXX is requested, reverse proxy
# it to http://hostname[:port]/new/pathXXXXXX
urlcopy is not a true copy anymore when it is fdprint'ed to proxy_fd,
this is because percent_decode_in_place() is called after the copy
is created.
Not fixing this breaks reverse proxying all URIs containing percent
encoded spaces, e.g. - because a decoded URI will be printed out
to proxy_fd instead of the original.
The fix keeps the logic in place to canonicalize the uri first, before
reverse proxying (one could argue that the uri should be proxied
completely unaltered, except for the prefix rewrite), but percent
(re-)encodes the (canonicalized) string before it is used.
Please find attached patch that is tried and tested to work.
Regards,
Jim
______________________________________________________
Firemail.de Freemail - 10 GB für Mails und Daten
POP3 und IMAP kostenfrei
http://www.firemail.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: busybox-httpd-proxy-request-reencode-after-decode.patch
Type: text/x-patch
Size: 1738 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20180706/bd5ba151/attachment.bin>
More information about the busybox
mailing list