Looks like a historical bug. Its err argument is an error number, but
if it isn't using a custom error message for it, it just calls
strerror() with the errno global, effectively ignoring its argument
and returning a semi-random string.
This dependency was spuriously added, maybe for debug reasons,
as confirmed to me by Diego Nehab by mail.
Some systems based in Lua (e.g. Ginga) prohibit the use of
io module for security reasons, so this dependency makes
mime unusable; even worse this makes other modules, based
on mime, unusable too (e.g. html).
When the test client finishes, the test server asserts with a "closed" message.
After looking carefully at this, I think the tests are running
successfully and passing. Since it appears to be a test failure, I
modified the server to allow the client to close the control connection.
Connect timeouts are implemented by waiting on the new socket
descriptor. When select() is used for this, it imposes an arbitrary
limit on the number of connections that can be made, usually 1024-3.
Using poll() removes this limit on the number of simultaneous TCP
connections can be made using luasocket. The previous default
implementation using select() is available by defining SOCKET_SELECT.
Note that using socket.select() always uses select(), so it isn't
possible to wait on an arbitrary number of connections at once.
A zero-length send is invalid with TCP, but well defined with UDP.
udp:send"" was returning (nil,"refused"), indicating that it failed when
the packet was actually sent. The test script reproduces the bug, and
includes a tcpdump of the zero length packet being sent.
The luasocket tests require LUASOCKET_DEBUG to be defined at build time,
but for OS X if COMPAT was undefined, the command line looked like
... -I -DLUASOCKET_DEBUG ...
so that the the macro definition was silently being treated as the
argument to -I. Result is the macro was never set, and tests would
never run. Fixed by moving -I to the (optional) definition of the
location of compat headers.
Sprout from master 2007-10-11 21:16:28 UTC Diego Nehab <diego@tecgraf.puc-rio.br> 'Tested each sample.'
Cherrypick from master 2007-05-31 22:27:40 UTC Diego Nehab <diego@tecgraf.puc-rio.br> 'Before sending to Roberto.':
gem/ltn012.tex
gem/makefile