summaryrefslogtreecommitdiff
path: root/usr.sbin/httpd
AgeCommit message (Collapse)Author
2016-10-10Fix msgbuf_write() usage idiom and modify the treatment for socket closeRafael Zalamena
to exit gracefully instead of fatal()ing. ok reyk@
2016-10-10Add more context to fatal*() messages so it makes easier to debug proc.cRafael Zalamena
internals. ok phessler@
2016-10-07The strchr() call either returns a NULL pointer, on which the code willPatrick Wildt
break out of the loop, or a pointer to ':'. Thus the extra check for ':' is unnecessary and can be removed. ok jung@
2016-10-07Empty lines cause server_fcgi_getheaders() to immediately return.Patrick Wildt
Unfortunately in that case the line was not freed. This lead to a memleak on each request. Thus, save the return value prior to returning, free the line and return the saved value. ok jung@
2016-10-05Check if oldd == newd before dup2(), if that is the case we need to removeRafael Zalamena
the CLOEXEC flag ourselves. ok bluhm@, deraadt@
2016-10-05Call setsid() to create a new session for the executed processes.Reyk Floeter
From deraadt@ OK rzalamena@
2016-10-05sync proc.c with vmd: add p_pw to specify a non-standard user for a process.Reyk Floeter
OK rzalamena@
2016-09-28Add -Wcast-qual after syncing proc.c fixReyk Floeter
2016-09-28sync proc.c from switchd, includes minor cast qual fix and removal of p_env.Reyk Floeter
2016-09-15add some Xr for acme-client(1);Jason McIntyre
2016-09-03Replace [RELAY|SERVER]_MAXPROC with the new PROC_MAX_INSTANCESReyk Floeter
variable and limit it from 128 to 32 instances (the old value). While here, move a few PROC_ defines around. OK rzalamena@
2016-09-03Use DPRINTF instead of #ifdef DEBUG + log_debug().Reyk Floeter
Pointed out by benno@
2016-09-02proc.c tweaks: Rename proc_listento() to proc_accept() as it is theReyk Floeter
receiving side of proc_connect(). Move some code from main into proc_init(), the function is now called by parent and children, not just the parent and it is less copy + paste for other daemons. OK florian@
2016-09-01The fork+exec diff broke "what?!", the ps_what field determines theReyk Floeter
configuration that has to be initialized in each process and was inherited from the parent instead of setting it everywhere. I'm surprised that it worked. OK florian
2016-09-01Don't print "lost child" if the child process exited okay. This isReyk Floeter
the old behaviour and unbreaks the regress tests.
2016-09-01struct client starts to become the kitchen sink. Move fastcgi data toFlorian Obser
its own struct. Requested by and OK reyk@
2016-09-01spacingReyk Floeter
2016-09-01Adjust log message, use process title now that it works againReyk Floeter
2016-09-01Teach httpd/proc.c how to fork+exec.Rafael Zalamena
This commit implemented the basic functions to proc.c to make it not rely on global variables, malloc()ed memory and CLOEXEC pipes. Fix child proc titles from reyk@ ok reyk@, florian@
2016-08-30Kill (remove) the ps_pid from privsep struct since it is not being usedRafael Zalamena
anymore. Also fix the process initialization prototypes. ok reyk@
2016-08-30Terminate daemon using the socket status instead of watching SIGCHLD orRafael Zalamena
kill()ing child process. "Looks good to me" millert@ ok benno@
2016-08-30Remove duplicated prototypes from header.Rafael Zalamena
"Looks good to me" natano@
2016-08-30Do not assume that the full http response header is in the firstFlorian Obser
fastcgi stdout record. Keep processing stdout records until we found the header / body separator and only then generate the header response. Problem reported by many. OK jung@
2016-08-27Kill p_instance from proc.c and remove static proc_id unused variables.Rafael Zalamena
To keep the debug functionality intact and correct we'll use the pid field in the imsg header to pass the instance number. Remember to always pass 'ps_instance + 1' otherwise libutil will fill imsg header pid field with the imsgbuf pid (which is the current process pid). ok reyk@
2016-08-26Kill the ps_ninstances from proc.c.Rafael Zalamena
We got the same information in ps_instances[proc] (more accurate) and we avoid allocating unnecessary memory for pipe storage. ok reyk@
2016-08-26Replace the static env variables with a single global variable.Rafael Zalamena
ok reyk@
2016-08-22Enable SNI support in httpd(8).Joel Sing
ok reyk@
2016-08-16stop including sys/param.h for nitems. define locally as needed.Ted Unangst
ok natano reyk
2016-08-16Turn "TLS handshake failed -" log message into a debug message - itReyk Floeter
happens way too often and does not provide much information. OK jung@
2016-08-16Rename server_handshake_tls() to server_tls_handshake() to align withReyk Floeter
the other server_tls_* functions (and I like the prefix notation better). No functional change.
2016-08-15Move server_match() from parse.y to server.c; use env instead of conf,Joel Sing
which is actually the same thing (cluebat from reyk@).
2016-08-15Use lowercase 'tls' in debug and log messages for consistency.Joel Sing
Requested by reyk@
2016-08-15Make httpd stricter with respect to TLS configuration - in particular, doJoel Sing
not allow TLS and non-TLS to be configured on the same port, do not allow TLS options to be specified without a TLS listener and ensure that the TLS options are the same when a server is specified on the same address/port. Currently, these configurations are permitted but do not work as intended. Also factor out and reuse the server matching code, which was previously duplicated. ok reyk@
2016-08-01sync http.h with relaydSebastian Benoit
ok reyk@
2016-07-27According to RFC 7231 4.3.7, OPTIONS may have body. "Although thisReyk Floeter
specification does not define any use for such a payload, future extensions to HTTP might use the OPTIONS body to make more detailed queries about the target resource." The future has arrived. Found and tested by Michael Lechtermann OK benno@
2016-07-13Adjust existing tls_config_set_cipher() callers for TLS cipher groupJoel Sing
changes - map the previous configuration to the equivalent in the new groups. This will be revisited post release. Discussed with beck@
2016-06-21do not allow whitespace in macro names, i.e. "this is" = "a variable".Sebastian Benoit
change this in all config parsers in our tree that support macros. problem reported by sven falempin. feedback from henning@, stsp@, deraadt@ ok florian@ mikeb@
2016-06-10grammar fix; from nick permyakovJason McIntyre
2016-06-10& expands to the maximum amount of needed space; fix comment.Florian Obser
Pointed out by Frank Schoep, thanks!
2016-05-31Unbreak compilation with -DDEBUG.Joel Sing
From Fabian Raetz <fabian dot raetz at gmail dot com>
2016-05-27Return "400 Bad Request" instead of "500 Server Internal Error" forKenneth R Westerback
requests lacking "HTTP/<version>". This makes it more obvious that httpd(8) does not attempt to support HTTP v0.9 (circa 1991), when "GET <url>\r\n" was valid. ok millert@ florian@
2016-05-22makes sure the value of the asprintf buffer is zeroed on errorJoerg Jung
from Hiltjo Posthuma "do." deraadt
2016-05-22fix unbalanced va_start and va_end macrosJoerg Jung
from Hiltjo Posthuma "do." deraadt
2016-05-17Repair some file descriptor leaks.Theo de Raadt
ok beck krw millert
2016-05-09in the http redirect example, also include the requested url insteadT.J. Townsend
of just going to the home page. requested by and ok beck
2016-04-28Avoid unusual Content-Type: even in an example;Ingo Schwarze
people might get hurt when doing copy & paste. Patch from Hiltjo Posthuma <hiltjo at codemadness dot org>. OK florian@ jmc@
2016-04-28Include the TLS configuration errors in log messages. Also set theJoel Sing
certificate and private key at the same time.
2016-04-28Simplify TLS configuration handling. Instead of matching by address/port,Joel Sing
match by configuration ID. This also prevents a memory leak when there are multiple certificates specified for the same server. ok beck@
2016-04-24new sentence, new line;Jason McIntyre
2016-04-24Document CGI variables. Work done by Tim Baumgard <openbsd@bmgrd.com>Christopher Zimmermann
I clarified DOCUMENT_URI and SCRIPT_NAME. ok florian@