* Fixed global assignment that should be local
Made result variable be local, see Issue #113
* Made global variable local
Made ASCII variable be local, see Issue #113
* Made more variables local
Related to Issue #113. questionMarkPos, and b,c,d,e,f all are global in scope, and are not cleared from memory, so leak.
Frankly, b, c, d, e, and f are not used either, but will now get GC'd later, if they ever were assigned, so not problematic
line 114 also has _ and i to make local too, so were put on their own line.
i on line 24 also was unnecessarily global, and undetected in issue #113
* Made module more local
Made the basicAuth table local in scope. Since it is returned when dofile is called in httpserver.lua, that already has a correctly scoped table, 'auth'. This is related to issue #113, and should reduce memory loss to globals
* Made bufferedConnection local
bufferedConnection was global and didn't have to be. Part of issue #113.
Now no longer remains in _G (globals table) after a connection has closed.
sometimes I observe requests which are malformed (seem to be binary
data) so everything that does not have a method and request (url)
defined gets kicked.
If a filename contains dots, extension was parsed as everything after
the first dot.
File extension must be what it is after the last dot.
Also includes a rewrited workaround for mimetypes if the requested file
gzip compressed.