Godzil
53e12f21f1
Change text/plain to application/octet-stream
2019-10-31 02:04:27 +00:00
Gregor
9b33c564db
use httpserver-header.lua in httpserver-error.lua implementation
...
Add all HTTP response codes used in the project
allow extra headers to be passed
2017-05-29 20:55:42 +02:00
Marcos
1a5f7507be
Merge branch 'dev' into master
2017-01-27 21:58:50 -06:00
Marcos Kirsch
472af17b18
Merge branch 'master' of https://github.com/marcoskirsch/nodemcu-httpserver
2016-12-26 13:49:04 -06:00
Marcos Kirsch
856ef7a590
There was a typo (entra n) when sending 'Cache-Control: private, no-store' in the header. I removed the whole thing because why not let browser cache?
2016-12-26 13:48:54 -06:00
Marcos Kirsch
1cc0d120f0
Add private to Cache-Control
2016-12-17 21:12:25 -06:00
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
Balazs Hollosi
2b75289dfc
typo fix at Cache-Control header, new http response code: 500 / internal server error
2016-05-27 01:35:10 +02:00
Balazs Hollosi
67e5ff5c20
typo fix at Cache-Control header, new http response code: 500 / internal server error
2016-05-27 01:12:57 +02: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