Commit graph

17 commits

Author SHA1 Message Date
glenda 4daf4ffdbe /rc/bin/rc-httpd/handlers/error: restore fn 400 (thanks, qeed) 2022-04-01 02:12:30 +00:00
glenda 241667b933 /rc/bin/rc-httpd/handlers/{dir-index, serve-static}: commit the correct files this time (thanks, igor) 2022-04-01 01:59:47 +00:00
glenda 60ef662b98 /rc/bin/rc-httpd/handlers/{dir-index, serve-static}: fix directory traversal bug (thanks, igor) 2022-04-01 01:53:29 +00:00
glenda e2a8d3493a /rc/bin/rc-httpd/{rc-httpd, handlers/error}: do some minimal sanitization on $SERVER_NAME before handing it off to select-handler. this prevents malformed Host: headers from retrieving arbitrary files from the file system. (thanks, Lightning) 2021-11-21 23:42:13 +00:00
Alex Musolino cf69bb920a rc-httpd: fix invalid test(1) invocation in dir-index 2020-08-02 18:30:01 +09:30
Alex Musolino c43700f569 rc-httpd: append carriage return to content-length header 2020-01-07 17:28:59 +10:30
Alex Musolino 4ff5a4febb rc-httpd: serve markdown with text/plain content-type 2019-06-20 16:26:03 +09:30
Alex Musolino 3a3eb0434c rc-httpd: set charset=utf-8 for all text/* content types 2019-06-17 13:17:16 +09:30
Alex Musolino 8648e06534 rc-httpd: only emit charset option for text/plain content type 2019-06-17 13:13:40 +09:30
Alex Musolino 78c7cd0c01 rc-httpd(8): avoid duplicate log output in dir-index handler
Delay calling do_log until just before emitting the response.  This avoids
calling do_log before potentially handing control to the static-index
handler, which also calls do_log.
2019-06-05 16:04:50 +09:30
cinap_lenrek 1a1863e5dc rc-httpd: cleanup cgi handler
- avoid silly stats and checks for $cgi_dir, just use status
  from builtin cd.

- log proper http status code from the cgi script
2015-06-02 16:56:19 +02:00
stanley lieber 20b8f1e777 rc-httpd/handlers/dir-index: plan 9 files may be chmod +a:
The mode printed under the -l option contains 11 characters,
          interpreted as follows: the first character is

          d    if the entry is a directory;

          a    if the entry is an append-only file;

          -    if the entry is a plain file.

Therefore, handle them in automatically generated directory listings.
2015-05-14 21:04:51 -04:00
cinap_lenrek 8ef66ca212 rc-httpd: support for http basic authentication, fix cgi support to work with hgweb.cgi 2015-03-14 01:02:43 +01:00
stanley lieber b46a3ee95f rc-httpd/handlers/serve-static: restore simple test for file type and hardcode max_age to 1 hour (thanks eekee) 2014-07-11 23:24:27 -04:00
stanley lieber 0201795805 rc-httpd/handlers/serve-static: restore Content-length 2014-02-22 02:24:37 -05:00
stanley lieber 40dee61f91 rc-httpd/handlers/serve-static: charset=utf-8 2013-02-19 18:13:32 -06:00
stanley lieber c877493fb0 add rc-httpd 2013-02-04 16:40:05 -06:00