diegonehab/luasocket — pull request #69 by catwell (2013-07-05 16:07:33+00:00)
Title: fixes related to constants in the HTTP module

These two commits fix small issues with constants in the HTTP module.

The first one is that the default value of TIMEOUT is [declared as a global](https://github.com/diegonehab/luasocket/blob/22cd5833fcc0e272f26004a79c8545e959ba406b/src/http.lua#L25) but then the code is [looking for it in _M]([taken from _M](https://github.com/diegonehab/luasocket/blob/22cd5833fcc0e272f26004a79c8545e959ba406b/src/http.lua#L116)). The fix puts the default value in _M too.

The second one is that the module reads the PROXY global without declaring it first. This causes errors when making HTTP requests with a script like *pl.strict* from Penlight loaded:

socket/http.lua:189: variable 'PROXY' is not declared

The fix here is, again, to look in _M instead of the global namespace (like for the other "constants").