httpd should accept trailing slash after PATH_INFO

Andreas Mahling andreas.mahling at googlemail.com
Tue Mar 7 18:53:31 UTC 2023


hello,

I stumbled upon a problem with the CGI-enabled httpd. It seems that
httpd can't handle a CGI call with an appended PATH_INFO, if the
latter ends with a slash. httpd takes this as a call for a directory
listing and throws 404.

For further details you may take a look here:
https://lists.zx2c4.com/pipermail/cgit/2023-March/004825.html

I've attached a patch, which works for me, although my understanding
of the httpd.c code is only superficial.

Patch was generated by
diff -u networking/httpd.c networking/httpd.c.new >httpd.patch
against the busybox-1.34.1 tarball

Thanks a lot to the busybox developers for their outstanding work.

best regards
Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: httpd.patch
Type: text/x-patch
Size: 703 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20230307/919702ca/attachment.bin>


More information about the busybox mailing list