25 Commits

Author SHA1 Message Date
Marcos Kirsch
2e25a63807 Improved logging via serial.
Created a single log function that prints a standard message that
includes IP and port of client. Remove or commented out other debug
prints.
2017-02-04 21:50:57 -06:00
Marcos Kirsch
dba1ca7968 Fix - make fileHandle and clean it up, so it plays nice with coroutines. 2017-01-01 23:02:18 -06:00
Marcos Kirsch
2034480679 Simplify by using file object model API 2017-01-01 22:12:18 -06:00
Marcos Kirsch
bf7f918d28 Added comments, chunk sized cannot be presently increased. 2016-02-21 22:12:09 -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
1b8a1f7750 Added handling of watchdog for serving bigger files 2015-12-03 12:48:27 +01:00
Philip Gladstone
b4a2d02431 Fix the problem with the more modern SDK only allowing one outstanding
connection:send at a time. Long and short of it, don't use coroutine.yield
any more when serving content.
2015-11-22 13:39:03 -05: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
Ryan Voots
ef340bc82a Implement support for more arbitrary HTTP methods. Allows GET PUT and POST. With minor changes needed to support others 2015-08-31 18:28:03 -07:00
Marcos Kirsch
ead632d131 Refactoring - function for sending headers is now in its own file. All errors are sent using coroutine. Some other memory usage improvements 2015-04-19 23:42:58 -05:00
Artem Pastukhov
489ecb2544 fix %.gz regexp 2015-04-03 13:23:33 +03:00
Artem Pastukhov
6d608af486 Fix end of line 2015-04-03 12:50:41 +03:00
Artem Pastukhov
a51a4d929b Fixes, fixes 2015-04-02 16:57:26 +03:00
Artem Pastukhov
dd7aa55d96 Fixes 2015-04-02 16:09:38 +03:00
Artem Pastukhov
e9903863a9 Manual merge changes 2015-04-02 16:07:25 +03:00
Artem Pastukhov
da17c3b346 Merge branch 'master' of https://github.com/pastukhov/nodemcu-httpserver
Conflicts:
	Makefile
	http/node_info.lua
	httpserver-static.lua
2015-04-02 16:02:39 +03:00
Artem Pastukhov
a37de51189 some fixes 2015-04-02 15:37:40 +03:00
Marcos Kirsch
f09fe9a610 Fix typo: It's json not josn 2015-04-01 22:58:25 -05:00
Artem Pastukhov
0120924403 Fix some typos 2015-03-31 10:02:33 +03:00
Marcos Kirsch
4f6cd02b1f Fixes serving multiple connections simultaneously by reopening and scanning the file 2015-03-15 22:12:00 -05:00
Marcos Kirsch
b10a137712 Finally works when serving multiple files simultaneously. Still need to clan up 2015-03-15 13:16:59 -05:00
Marcos Kirsch
e571f19d81 Increase chunk size, improved traces for debugging purposes. 2015-03-10 22:12:49 -05:00
Marcos Kirsch
77920f4a94 Big refactoring: server now uses a separate thread that yields and then resumes on 'sent'. This allows us to serve large files. Moved serving of error pages and serving of static files into separate scripts httpserver-error.lua and httpserver-static.lua 2015-02-28 16:39:06 -06:00