-*- org -*-
* Notes
-* Tasks [3/8]
+* Tasks [8/10]
+** TODO documentation for running in a chroot jail
+see https://wiki.archlinux.org/index.php/nginx#Installation_in_a_chroot
+
+** incremental handler calls
+not sure if the extra performance is worth the added complexity
+
+Before the header is fully parsed, call any potential handlers.
+Include a field in the request object to indicate that the request
+isn't finished being received so handlers can return and wait to be
+called again.
+
+Also, put a catch in the filter function and allow the =headers=
+function on the request object to throw to said catch aborting the
+handler and waiting for the rest of the input.
+
+** DONE Documentation [6/6]
+- [X] introduction
+- [X] handlers
+- [X] request headers
+- [X] usage examples
+- [X] list of functions
+
+Notes to touch upon
+- [X] how to set content type
+
** DONE Handle POST requests
1. read standard for POST data
2. parse multi-line headers with boundaries
-For now keep this all incremental and in ews-filter.
+For now keep this all incremental and in ws-filter.
** DONE Makefile
- byte-compile
** DONE catch errors and return an error code
include an easy error handler like the 404 handler
-** TODO better parsing of multipart form blocks
+** DONE better parsing of multipart form blocks
parse more than just the content-type headers.
-** TODO non-multipart form data
+** DONE non-multipart form data
e.g., parameter strings
-** TODO some more convenience functionality [4/5]
-- [ ] strip and parse URL query string
+** DONE some more convenience functionality [6/6]
+- [X] strip and parse URL query string
+- [X] parse urlencoded post data
- [X] think about defaulting to (name . content) for form elements
- [X] maybe don't require a non-nil return to cancel the connection,
instead only keep open if :keep-open is returned
- [X] function to send a file (with mime handling)
- [X] send a 404 with some default text
-** TODO Lazy header processing
+** CANCELED Lazy header processing
+ - State "CANCELED" from "TODO" [2013-12-25 Wed 12:21] \\
+ premature optimization
Use lazy sequence functions for header a-list to avoid parsing all
headers. For regexp matchers should stop when matched header is
encountered (often the first one when :GET), For function matchers
provide lazy version of assoc.
+Also, there is the issue of how a lazy request for more parameters
+should act before all incoming text has been received. Emacs does not
+provide a light-weight mechanism for a function to wait for incoming
+process text without something gross like the =(sit-for 0.1)= used in
+the test suite.
+
** TODO use gnutls for https
I think this should work.
-* Documentation
-** Writing Handlers
-*** Matching
-*** Handler Functions
-At any time one can throw =close-connection= to abort the handler and
-close the conncetion. If the keyword =:keep-open= is thrown, then the
-handler aborts, but the connection isn't closed.
-
-A return value of =:keep-open= will keep the connection open,
-otherwise it is closed when the handler returns.