orthecreedence / wookie

Asynchronous HTTP server in common lisp
http://wookie.lyonbros.com/
MIT License
189 stars 19 forks source link

Don't break on EPIPE & ECANCELED; always allow declarations in route definitions. #67

Closed ivan4th closed 9 years ago

ivan4th commented 9 years ago

On Linux, EPIPE & ECANCELED that weren't handled properly were showing up when reloading a page multiple times without waiting for previous requests to finish. Also, in case BIND-ARGS was specified, NIL was inserted after first DECLARE in route body, breaking declarations (sbcl). This needs orthecreedence/cl-async#121

orthecreedence commented 9 years ago

Oh just a quick note...I've been developing mainly against the fast-http branch in Wookie and it will soon be merged into master. You might want to try it out.

I think the only part of the API that has changed is the error handling. Instead of *error-handler*, wookie exposes and :event-cb keyword when instantiating the listener object. Also, *debug-on-error* is now supported and lets error bubble into the debugger (and all applicable handler-case calls have been changed to handler-bind to support this).

Also, fast-http now uses hash tables for headers instead of plists, which may break a good amount of things. Wookie provides a convenience function get-header to help mitigate this, but pretty much anywhere that uses (getf (request-headers req) ...) will need to change to (get-header (request-headers res) ...). Responses (ie (response-headers)) still use plists.

I've been keeping fast-http in sync with master, so all the changes you've submitted should all be in there.