summaryrefslogtreecommitdiff
path: root/usr.sbin/httpd
AgeCommit message (Collapse)Author
2019-06-28When system calls indicate an error they return -1, not some arbitraryTheo de Raadt
value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
2019-05-08The QUERY_STRING macro is not actually URL encoded, so fix the manual.Theo Buehler
Add a QUERY_STRING_ENC macro that is URL encoded. Patch from Tim Baumgartner ok reyk
2019-05-08Set the REQUEST_URI CGI variable to the requested URI and query stringTheo Buehler
instead of the rewritten path and query string. Patch from Tim Baumgard, reminded by Mischa Peters. ok benno, reyk
2019-05-08spacingReyk Floeter
2019-05-03Add a "forwarded" log format that extends the "combined" log formatTheo Buehler
by including the contents of the X-Forwarded-For and X-Forwarded-Port headers. If httpd(8) runs behind a proxy like relayd(8), this allows tracking the origin of the requests. The format is compatible with log analyzers such as GoAccess and Webalizer. Patch from Bruno Flueckiger ok benno, reyk
2019-05-02Avoid opening log files on "no log"kn
When not logging anything, do not open files in the first place. This prevents startup failures on configurations where the log/ directory is missing but logging is disabled anyway. OK aja solene reyk
2019-04-16document where multiline {} is applicable;Jason McIntyre
lack of documentation and original diff provided by alfred morgan; benno helped me track down the applicable options; ok benno
2019-03-12reference the /etc/examples files for httpd and acme-client. started from a ↵Jason McIntyre
thread by alfred morgan, who wanted a tls example in the man page. florian noted that they exist already in /etc/examples; ok florian
2019-02-19httpd(8): add support for setting custom FastCGI parameters.Paul Irofti
This commit extends the existing grammar by adding the param option to the fastcgi directive: fastcgi param name value. Example usage: fastcgi param VAR1 hello fastcgi param VAR2 world With help and OK florian@ Rogue manpage bits, feel free to modify them.
2019-02-13(unsigned) means (unsigned int) which on ptrdiff_t or size_t or otherTheo de Raadt
larger types really is a range reduction... Almost any cast to (unsigned) is a bug. ok millert tb benno
2019-02-10log X509 peer's cert subject name when tls client authentication is used,Sebastian Benoit
in the same way as the http authenticated username is loged. From Karel Gardas, gardask at gmail dot com, Thanks! ok florian@
2019-02-08Improve fastcgi socket documentation and mention that TCP is supported inFlorian Obser
addition to UNIX domain sockets. Prompted by a mail from Daniel Gracia ( paladdin AT gmail ) pointing out that we are not documenting TCP support at all, thanks! Prodding by and with jmc@
2019-01-08Allow httpd(8) to start when TLS is configured but a cert is not yetFlorian Obser
available. Assuming a httpd.conf based on /etc/examples/httpd.conf, httpd(8) will only listen on port 80 and serve the acme-challenge directory for acme-client(1). The workflow to get a certificate then becomes acme-client -vAD example.com && rcctl reload httpd Without the need to edit the httpd.conf yet again. Once the cert is in place and httpd is reloaded it starts to serve on port 443. Idea, tweaks & OK deraadt, OK benno
2018-12-04Check maxrequestbody when we found the right server / location.Florian Obser
Very patiently pointed out repeatedly by Tracey Emery ( tracey AT traceyemery.net ), thanks! OK benno
2018-11-04isalpha(3) requires an unsigned char value (or -1).Philip Guenther
from Hiltjo Posthuma (hiltjo(at)codemadness.org)
2018-11-01- odd condition/test in PF lexerAlexandr Nedvedicky
(and other lexers too) This commit rectifies earlier change: in the lex... even inside quotes, a \ followed by space or tab should expand to space or tab, and a \ followed by newline should be ignored (as a line continuation). compatible with the needs of hoststated (which has the most strict quoted string requirements), and ifstated (where one commonly does line continuations in strings). OK deraadt@, OK millert@
2018-10-15Omit HSTS headers over unencrypted connections, per RFC 6797.Anthony J. Bentley
ok florian@
2018-10-11Backout my previous commit:Sebastian Benoit
date: 2018/10/01 19:24:09; author: benno; state: Exp; lines: +7 -1; commitid: 0O8fyHPNvPd8rvYU; Only send 408 Timeout responses when we have seen at least part of a request. Without a request, just close the connection when we hit request timeout. Prompted by a bug report from Nikola Kolev, thanks. ok reyk@ and some suggestions from claudio@ and bluhm@ Mark Patruck (mark AT wrapped DOT cx) found a problem with it, thanks for the report. ok reyk@ bluhm@ sthen@ deraadt@
2018-10-01Only send 408 Timeout responses when we have seen at least part of aSebastian Benoit
request. Without a request, just close the connection when we hit request timeout. Prompted by a bug report from Nikola Kolev, thanks. ok reyk@ and some suggestions from claudio@ and bluhm@
2018-09-09During the fork+exec implementation, daemon(3) was moved afterAlexander Bluhm
proc_init(). As a consequence httpd(8) and relayd(8) child processes did not detach from the terminal anymore. Dup /dev/null to the stdio file descriptors in the children. OK benno@
2018-09-07Do not send a Content-Length header for 1xx and 204 status codes sinceFlorian Obser
RFC 7230 states that a server MUST NOT do so. At least relayd chokes on this. Pointed out & diff by Carlin Bingham (cb AT walcyrge.org), thanks! OK benno
2018-09-07replace malloc()+strlcpy() with strndup() in cmdline_symset().miko
"looks good" gilles@ halex@
2018-08-19double the allowed length for the 'tls ciphers' optionJasper Lievisse Adriaanse
for example now it can hold the recommended cipher list from the mozilla ssl config generator rather than failing with a "ciphers too long" error. ok benno@ sthen@ tb@
2018-07-11Do for most running out of memory err() what was done for most runningKenneth R Westerback
out of memory log_warn(). i.e. ("%s", __func__) instead of manual function names and redundant verbiage about which wrapper detected the out of memory condition. ok henning@
2018-07-09No need to mention which memory allocation entry point failed (malloc,Kenneth R Westerback
calloc or strdup), we just need to log that we ran out of memory in a particular function. Recommended by florian@ and deraadt@ ok benno@ henning@ tb@
2018-06-20Add support for simple one-off internal rewrites.Reyk Floeter
For example: location match "/page/(%d+)/.*" { request rewrite "/static/index.php?id=%1&$QUERY_STRING" } Requested by many. Ok benno@
2018-06-18remove the SECTIONS header, since a one line DESCRIPTION is a bit silly;Jason McIntyre
use a more general text for the sections, and avoid the catchup issue that was trying to document how many there were; ok benno rob
2018-06-15Something went wrong - the strip option was documented twice.Reyk Floeter
Found by Mischa Peters, thanks
2018-06-15Fix 304 Not Modified response: don't send a body, use the correct MIME type.Reyk Floeter
Reported by Hidvegi Gabor gaborca websivision hu Fix found by anton@ OK anton@
2018-06-13one too many .El;Jason McIntyre
2018-06-13Rename httpd.conf "root strip" option to "request strip".Reyk Floeter
"root strip" was semantically incorrect and did cause some confusion as it never stripped the root but the client's request path. Discussed with many. Heads up: this is a grammar change that also affects acme-client(1) configurations (see current.html). OK claudio@
2018-06-11The http_query is already url_encoded; don't encode it twice.Reyk Floeter
This fixes a bug in the macros and log file handler that double-encoded the query. This does not change FCGI as it was already handling the query correctly. Additional verification of the QUERY_STRING should be implemented as well. OK claudio@
2018-06-11Sorry, forgot a whitespace.denis
Spotted by benno@
2018-06-11Fix an off-by-one line count when using include statements.denis
Thanks to otto@ for the initial diff. OK benno@
2018-05-23Set the port.op value when parsing the httpd.conf port value.Alexander Bluhm
Otherwise the default port for http or https may used depending on uninitialized memory. Fixes regress on i386. OK reyk@
2018-05-23Forgot to revert another "port 80"Reyk Floeter
Pointed out by jmc@
2018-05-19Add support for client certificate authentication to httpd.Joel Sing
From Jack Burton <jack at saosce dot com dot au> - thanks! Also tested by Jan Klemkow <j.klemkow at wemelug dot de>. ok beck@ reyk@
2018-05-18Move LISTEN ON {} code into a function listen_on().Reyk Floeter
No functional change, but it makes it easier to deal with the grammar.
2018-05-18Revert manpage description as wellReyk Floeter
2018-05-18Revert previous: it introduced a shift/reduce conflict in the grammar.Reyk Floeter
2018-05-18Allow to omit the listen port configuration. Default to port 80, tls port 443.Reyk Floeter
OK florian@ jmc@
2018-04-26Plug leak in error case of the common 'varset' implementations.Kenneth R Westerback
ok benno@
2018-04-11Make httpd listen on all IPv4 and IPv6 addresses forFlorian Obser
"listen on * port 80". While here accept up to 16 addresses from DNS or interface groups. requested by & "lovely" deraadt@ OK kn@
2018-04-06After processing of a range request httpd would never close theFlorian Obser
connection and eventually stop answering queries because of file descriptor starvation. Problem reported by, minimal testcase provided and testing by trondd _AT_ kagu-tsuchi.com, thanks! Testing Nick Holland and millert OK deraadt
2018-02-07NAME_MAX is the length of the thing between / / in a path *without*Florian Obser
the terminating NUL. Do not use it for a "small string" or a "probably short path". Replace it with new defines or PATH_MAX. It also makes the life easier for people auditing the tree for real usage of NAME_MAX. OK deraadt, benno
2018-01-04from paul de weerd: provide a more helpful Xr to ocspcheck, and noteJason McIntyre
that the path to "file" is not relative to the chroot;
2017-12-21typo;Jason McIntyre
2017-12-14set Location header for 307 and 308 status codesSebastian Benoit
ok sthen@ phessler@
2017-11-29Don't do OCSP stapling only if the staple file is 0 length.Bob Beck
This allows something external (like ocspcheck) to disable the stapling deliberatly if it can not retreive a valid staple by truncating the staple file to indicate "do not provide a staple", while the file not existin will still be treated as a configuration error ok claudio@ florian@, and prompted by @jsing
2017-11-28tweak previous;Jason McIntyre