6 Commits

Author SHA1 Message Date
Fractal147
9f4d7a9988 Fixed unnecessary globals as in issue #113. (#122)
* 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.
2018-01-14 22:03:37 -06:00
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
badbf6e2b9 This is really annoying... normalize line endings to Unix (LF). Please use Unix line endings so things diff right with git. 2016-12-26 13:47:22 -06:00
Develo
3dd98667dd httpserver-connection: implement fragmentation logic
Implement fragmentation logic in send() method of bufferedConnection:send(). Now, payloads are accumulated up to a threshold amount of bytes, and then flushed. If a payload would make the total accumulated larger, it gets carved to complete threshold and flushed. Any remainder get successively flushed in threshold-sized chunks, until the remainder is less than threshold, which then gets again buffered.
2016-02-21 15:48:49 -03:00
Marcos Kirsch
a75f74efb5 Improve documentation 2016-02-16 23:00:37 -06:00
Marcos Kirsch
e7db3dce7d Moved BufferedConnection into its own file. 2016-02-16 22:45:14 -06:00