15 Commits

Author SHA1 Message Date
ffedoroff
73fbf92986 line shorter
line is too long and luatool.py raize exception when uploading that file
2016-11-02 16:37:41 +06:00
Marcos Kirsch
1b4a2c9d9a Concatenate .. less in lua since BufferedConnection will do it for us anyway: 2016-02-21 12:23:06 -06:00
Marcos Kirsch
2f2fb26782 Several fixes and code cleanup. Gzipped files now work. Indentation cleaned up, Other small fixes: 2016-02-15 22:52:30 -06:00
Marcos Kirsch
fbc6506faa Merged with main repository 2016-02-15 20:54:11 -06:00
Marcos Kirsch
1b14a516aa Fix bugs for newer nodemcu-firmware: new firmware does not allow queuing multiple connection:send() operations. These changes ensure we yield after every send except the last one. 2016-02-15 13:52:01 -06:00
IntelliDust
1f43c9f5e5 Added Cache-Control header for gzipped content. This will prevent for
getting css.gz js.gz and so by browser from server.
2015-12-03 12:51:42 +01:00
Hazar Karabay
b7f78481a2 File extension parsing fix
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.
2015-09-16 22:10:21 +03:00
TJ Borromeo
2672d3b467 Keep return type as is
No need for 501 error code, as this should be returned only when needed, and will be much more efficient to not:
1.) take a table entry for the majority of cases when it isn't needed
2.) Utilize only enough memory needed to instantiate a string when it _is_ needed.
2015-05-06 13:54:21 -07:00
TJ Borromeo
e01e97469f Update httpserver-header.lua 2015-05-06 13:42:06 -07:00
TJ Borromeo
0c17703b46 change return type
allows the error check to be more functional
2015-05-06 13:39:32 -07:00
TJ Borromeo
219baa7b62 Update httpserver-header.lua 2015-05-06 13:36:20 -07:00
TJ Borromeo
b4842301a0 Fix improper syntax in list
brackets needed for non-standard table indexing.   Also added a trailing comma as its valid (and more consistent, imo).
2015-05-06 13:16:47 -07:00
TJ Borromeo
472e397429 create a maintainable way to add HTTP Status codez
Again, nil is default for attrs not present in a table, so if you're not nil, you should just return what you know is defined.  Otherwise, return the "Unknown HTTP Status" default string.
2015-04-24 15:20:06 -07:00
Artem Pastukhov
243ab35720 Add xml mime type 2015-04-21 09:34:05 +03:00
Marcos Kirsch
453f38b52f Small wording improvement 2015-04-19 23:40:36 -05:00