shellinabox/libhttp
Tom Vijlbrief f408467088 Fix a debug check on FreeBSD and probably Linux
On FreeBSD 12.0 I get within a minute:

Check failed at libhttp/httpconnection.c:433 in destroyHttpConnection(): !close(http->fd)

See also:

https://github.com/shellinabox/shellinabox/issues/389

I assume that close() fails with ECONNRESET and that we should just check
for errno != EBADF, which should also be OK for Linux and other systems,
which might return EIO in some conditions.

Linux close(2) manual page:

	EBADF	fd isn't a valid open file descriptor.
	EINTR	The close() call was interrupted by a signal; see signal(7).
	EIO	An I/O error occurred.

FreeBSD close(2) manual page:

     [EBADF]            The fd argument is not an active descriptor.
     [EINTR]            An interrupt was received.
     [ENOSPC]           The underlying object did not fit, cached data was
                        lost.
     [ECONNRESET]       The underlying object was a stream socket that was
                        shut down by the peer before all pending data was
                        delivered.

     In case of any error except EBADF, the supplied file descriptor is
     deallocated and therefore is no longer valid.
2016-09-11 12:31:47 +02:00
..
hashmap.c Use a config.h file, instead of passing configuration options on the compiler's 2009-02-11 23:25:15 +00:00
hashmap.h Updated copyright notice. 2009-01-02 06:09:13 +00:00
http.h Disable HTTP fallback via "/plain" URL (CVE-2015-8400) 2015-12-03 17:47:26 +01:00
httpconnection.c Fix a debug check on FreeBSD and probably Linux 2016-09-11 12:31:47 +02:00
httpconnection.h Real IP recognition over proxy (partial fix #54) 2015-05-17 20:05:15 +02:00
libhttp.sym Started working on support for WebSockets. 2010-03-29 16:40:17 +00:00
server.c Disable HTTP fallback via "/plain" URL (CVE-2015-8400) 2015-12-03 17:47:26 +01:00
server.h Disable HTTP fallback via "/plain" URL (CVE-2015-8400) 2015-12-03 17:47:26 +01:00
ssl.c Fixed spelling errors reported by lintian 2015-12-04 18:14:51 +01:00
ssl.h Disable HTTP fallback via "/plain" URL (CVE-2015-8400) 2015-12-03 17:47:26 +01:00
trie.c Fixed a null pointer dereference that could be triggered by using non-standard 2009-07-04 08:46:28 +00:00
trie.h Updated copyright notice. 2009-01-02 06:09:13 +00:00
url.c Logging and debuging 2015-08-23 19:25:36 +02:00
url.h Improved code session and URL handling 2015-05-26 22:37:32 +02:00