This should have been done a *long* time ago, back when I initially
added Websocket support. This is the first part of two in improving
loop handler support with regards to socket closure.
Reason may include: {normal, shutdown} for the most normal shutdown,
{normal, timeout} for a loop handler timeout shutdown, or {error, _}
if an error occured.
This behavior can be enabled with the `compress` protocol option.
See the `compress_response` example for more details.
All tests are now ran with and without compression for both HTTP
and HTTPS.
Modified the static example in the examples subdirectory
to use the mimetypes application to determine the appropriate
MIME type to send down the wire in the HTTP headers of the reply.
First step in making all methods and header names binaries to
get rid of many inconsistencies caused by decode_packet/3.
Methods are all binary now. Note that since they are case
sensitive, the usual methods become <<"GET">>, <<"POST">> and so on.