Commit Graph

12 Commits

Author SHA1 Message Date
Emil Mikulic
98c9fd318e . Added TODO list
. Changed a comment
2013-04-28 19:30:35 +10:00
Emil Mikulic
b959c6bc3a . Added strntoupper()
. rfc1123_date() now takes a time_t argument
. default_reply() now takes a `reason' string
. Skeleton process_get()
. Implemented process_request() completely (for now) (I hope)
. Changed oversized request error from 400 Bad Request
  to 413 Request Entity Too Large
2013-04-28 19:30:34 +10:00
Emil Mikulic
fd0a618d34 Initial implementation of parse_request() 2013-04-28 19:30:28 +10:00
Emil Mikulic
3759104f07 . Added rfc1123_date() and Date: header field to default_reply()
. Skeleton for parse_request()
2013-04-28 19:21:12 +10:00
Emil Mikulic
9074924be5 . Added MAX_REQUEST_LENGTH and a check for it in poll_recv_request()
. Fixed comment DEFAULT_PORT -> bindport
. "options:\n" -> "options:\n\n"
2013-04-28 19:21:12 +10:00
Emil Mikulic
cb3342472b . default_reply() ensures reply_type is REPLY_GENERATED
. Implemented poll_send_header()
. Partial implementation of poll_send_file() - can't send FROMFILE yet
2013-04-28 19:21:12 +10:00
Emil Mikulic
23b191239e . Added to struct connection:
o in_addr_t client
	o time last_active
	o {header,reply}_dont_free
. Added IDLETIME and poll_check_timeout()
. Added new_connection() and moved conn initialisation there
. Added default_reply()
. Skeleton for process_request()
. connnection.request is now null-terminated
. Removed debug code from poll_recv_request()
2013-04-28 19:21:12 +10:00
Emil Mikulic
ebe1e1bfa0 . Added LIST (sys/queue.h) of struct connection
. Added xmalloc()
. Filled out accept_connection()
. Added free_connection()
. Added xrealloc()
. Started poll_recv_request()
. Skeletons for poll_send_header(), poll_send_reply()
. Filled out httpd_poll()
2013-04-28 19:21:12 +10:00
Emil Mikulic
345c214212 . Added struct connection
. Skeleton accept_connection()
. Incomplete httpd_poll()
2013-04-28 19:21:12 +10:00
Emil Mikulic
7a8ff37bb3 . Changed argument --bind' -> --addr'
. Implemented arg parsing for port, addr, maxconn, log, chroot
. init_sockin() prints the addr:port that sockin is bound to
2013-04-28 19:21:12 +10:00
Emil Mikulic
79e52dfae2 . Moved pkgname, copyright to top of file to avoid having to duplicate
it in the comments.
. Got rid of DEFAULT_* defines in favour of initializers.
. Moved existing socket creation code to init_sockin().
. Added usage(). [needs work]
. Added parse_commandline() skeleton. [needs a lot of work]
2013-04-28 19:21:12 +10:00
Emil Mikulic
26aeb38a81 Initial revision - open and close a socket. 2013-04-28 19:21:00 +10:00