summaryrefslogtreecommitdiffstats
path: root/usr.sbin/httpd/server.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Only open a socket once for each unique "listen on" statement. Thisreyk2015-01-061-2/+19
| | | | | | | prevents running out of file descriptors when loading a configuration with many aliases. OK florian@
* Stop pulling in <arpa/inet.h> or <arpa/nameser.h> when unnecessary.guenther2014-12-211-2/+1
| | | | | | *Do* pull it in when in_{port,addr}_h is needed and <netinet/in.h> isn't. ok reyk@
* Like previously done in relayd, change the keyword "ssl" to "tls" toreyk2014-12-121-47/+47
| | | | | | reflect reality. OK benno@
* stop viral header propagation. none of this code uses sys/hash.htedu2014-12-041-2/+1
| | | | from Max Fillinger
* Update httpd(8) to use libtls instead of libressl.jsing2014-10-311-34/+34
|
* Remove unnecessary netinet/in_systm.h include.lteo2014-10-251-2/+1
| | | | ok millert@
* Update ressl configuration to handle recent changes in the library.jsing2014-10-031-7/+17
| | | | ok tedu@
* Fix an error case that was never handled ending up in an endless eventreyk2014-10-021-6/+10
| | | | | | | loop that could eat all CPU. I thought that the previous (correct) commit fixed it which wasn't the case. But this one is obvious. ok florian@
* Remove a limitation that only allowed to specify a server name once.reyk2014-09-051-3/+18
| | | | | | | | | The key has been changed to server name + address + port and now it is possible to use the same server name for multiple servers with different addresses, eg. http://www.example.com and https://www.example.com/. OK doug@ florian@
* FastCGI did not support persistent connections. Add initial supportreyk2014-09-021-1/+21
| | | | | | | | | for persistent connections with FastCGI by implementing chunked Transfer-Encoding. This only works with HTTP/1.1. With input and help from florian@ who found some FastCGI edge cases. OK florian@
* Write all data before closing the server socket if the output bufferreyk2014-08-271-5/+14
| | | | | | | is not empty. This fixes a bug of short responses that could happen with large files or fcgi data on connections with a higher latency. OK florian@
* Use memset(buf instead of memset(&buf.reyk2014-08-061-3/+3
| | | | Pointed out by deraadt@
* Also clean up the public key when it is no longer needed.jsing2014-08-061-2/+6
| | | | ok deraadt@ reyk@
* Configure the default SSL ciphers as HIGH:!aNULL.jsing2014-08-061-1/+3
| | | | ok deraadt@ reyk@
* http POST supportflorian2014-08-061-1/+3
| | | | with & OK reyk@
* spacingreyk2014-08-061-5/+5
|
* The watermark exposed a bug in server_write that broke keep-alivereyk2014-08-061-4/+5
| | | | | | | support. Instead of calling server_close from server_write, we have to proceed to the next connection by calling the error handler. OK jsg@
* Bring back the last read (done) / last write (done) messages instead of justreyk2014-08-061-3/+3
| | | | "done" to simplify connection debugging.
* Adjust the read/write watermarks according to the TCP send buffer.reyk2014-08-061-1/+13
| | | | | | | | | This fixes sending of large files. Previously, httpd was reading the input file too quickly and could run out of memory when filling the input buffer. Found by jsg@ OK florian@
* add missing va_start/va_end callsjsg2014-08-061-1/+3
| | | | ok deraadt@ guenther@
* Load the SSL public/private keys in the parent process, then provide themjsing2014-08-061-8/+66
| | | | | | | to the privsep process via imsg. This allows the keys to be moved out of the chroot (now /etc/ssl/server.crt, /etc/ssl/private/server.key). ok reyk@
* Improve logging to allow per- server/location log files. The logreyk2014-08-051-39/+64
| | | | | | | files can also be owned by root now: they're opened by the parent and send to the logger process with fd passing. This also works with reload. ok deraadt@
* Temporarily move the default location of the SSL/TLS server key andreyk2014-08-041-4/+7
| | | | | | | certificate from /var/www/ to /var/www/conf/. Don't get scared - this will be changed soon! They're currently located in the chroot directory but will be moved outside as soon as we adopted some of the key privsep from relayd in ressl/httpd.
* Proxy commit for jsing@:reyk2014-08-041-7/+221
| | | | | | | "Add TLS/SSL support to httpd, based on the recent ressl commits." From jsing@ ok reyk@
* Add initial support for log files in /var/www/logs/. Logging withreyk2014-08-041-10/+71
| | | | | | syslog is still supported but disabled by default. ok deraadt@
* httpd doesn't support SSL/TLS yet, remove the remaining bits.reyk2014-08-041-4/+1
| | | | The secrect plan is to add it later using the ressl wrapper library.
* spacingreyk2014-08-031-3/+3
|
* Add another log mode "connection" for a relayd(8)-style log entry afterreyk2014-08-031-23/+39
| | | | | each connection, not every request. The code was already there and enabled on debug, I just turned it into an alternative log format.
* Allow to specify a FastCGI TCP socket on localhost (eg. :9000). Usedreyk2014-08-021-1/+22
| | | | | | | for debugging, you should prefer local UNIX sockets, but it helped to find an issue that will be fixed with the next commit. OK florian@
* Use the log buffer to defer the logging until the connection is closedreyk2014-08-011-12/+22
| | | | | | or the request completed. Turn the old log message into a debug message. ok doug@
* remove the global "log updates/all" option that came from relayd.reyk2014-08-011-2/+2
|
* Correctly parse fcgi records if we don't get the whole record in oneflorian2014-08-011-1/+3
| | | | | bufferevent_read(). Input/OK reyk@
* One bufferevent can be shared by file and fcgi.reyk2014-07-311-5/+5
|
* Make "location" work with name-based virtual servers.reyk2014-07-301-14/+1
|
* Add "location" keyword to specify path-specific configuration inreyk2014-07-301-1/+17
| | | | | servers, for example auto index for a sub-directory only. Internally, a "location" is just a special type of a "virtual" server.
* The inflight decremented message should only be printed with DEBUG.reyk2014-07-291-2/+2
|
* Move configurable TCP options into struct server_config.reyk2014-07-291-19/+19
|
* Differentiate servers by address and port, not just by address.reyk2014-07-251-3/+4
|
* It is recommended to use a URL in the Location header of 3xxreyk2014-07-251-6/+19
| | | | | | responses. To accomplish this, add some semantics to retrieve the server host name of a connection: either IP, IP:PORT (if not 80) or [IP6]:PORT, or Host value (if valid).
* Add support for "virtual hosts" aka. server blocks aka. multiplereyk2014-07-251-2/+27
| | | | | | servers with the same or "overlapping" IP address but a different name. ok beck@
* Split server and server_config.reyk2014-07-251-9/+11
|
* Rename a field, needed later, no functional change.reyk2014-07-251-5/+5
|
* Plug a memleak by correctly free'ing the HTTP descriptor that containsreyk2014-07-241-2/+5
| | | | all the headers etc. of a connection.
* Correctly shutdown the servers when the process is terminating;reyk2014-07-231-1/+23
| | | | prevents a crash on exit. With debugging help from blambert@.
* Implement file descriptor accounting. The concept was taken fromreyk2014-07-161-31/+23
| | | | | | relayd but had to be adjusted for httpd. It now handles single-pass HTTP connections, persistent connections with multiple requests, and body-less HEAD requests. With input from benno@
* first step towards keep-alive/persistent connections supportreyk2014-07-141-2/+12
|
* Finish writing the output before closing the connectionreyk2014-07-131-2/+10
| | | | (adopted from relayd).
* Close the connection after the response is completed (no Keepalive yet).reyk2014-07-131-2/+2
|
* Add support for media types (aka. MIME types): the types section isreyk2014-07-131-1/+4
| | | | | | compatible to nginx' mime.types file which can be included directly. If not present, use a few built-in defaults for html, css, txt, jpeg, gif, png, and js.
* Add httpd(8), an attempt to turn the relayd(8) codebase into a simplereyk2014-07-121-0/+643
web server. It is not finished yet and I just started it today, but the goal is to provide an HTTP server that a) provides minimal features, b) serves static files, c) provides FastCGI support, and d) follows common coding practices of OpenBSD. It will neither support plugins, nor custom memory allocators, EBCDIC support, PCRE or any other things that can be found elsewhere. httpd(8) is not intended to provide a fully-featured replacement for nginx(8) or the Apache, but it will provide enough functionality that is needed in the OpenBSD base system. ok deraadt@