Modifications for additional HTTP methods.
KLUDGE: added OPTIONS/POST and body parsing/access.
Upped the body buffer.
Added If-None-Match token.
Change union u to struct u, and allow the u.hdr data to live until AFTER the HTTP callback.
Issue LWS_CALLBACK_HTTP_CLOSED regardless of u.http.fd status.
Close u.http.fd IF it's open.
Added 'Content-Type' header.
Removed a potential double-free caused by stashing the allocated headers in 'ah', which we no longer need to do.
I need to look into the memory issues more in depth.
Reverting for now to add additional header parsing..
Added libwebsockets_get_http_method.
Finally got alternate HTTP methods working.
Set wsi->u.hdr.ah to 0 to avoid potential double-free caused by commenting this memset!
Check for wsi->u.hdr.ah before doing the method check (probably unnecessary. Something else must be freeing it somewhere).
Make sure we don't overrun the body buffer.
There's some awful muckery here trying to prevent segfaults in a desperate manner.
In the future, a proper patch has to be constructed (or the near present, if this
doesn't work).
Added WSI_TOKEN_CONTENT_LENGTH
Towards getting the body parsed properly according to the content length header.
Store the body in a proper manner.
Tweaking.
Break on WSI_TOKEN_NAME when looking for body.
Added WSI_TOKEN_AC_REQUEST_HEADERS.