diff options
author | rofl0r <rofl0r@users.noreply.github.com> | 2020-09-07 20:49:07 +0100 |
---|---|---|
committer | rofl0r <rofl0r@users.noreply.github.com> | 2020-09-07 20:49:07 +0100 |
commit | 88153e944f7d28f57cccc77f3228a3f54f78ce4e (patch) | |
tree | 706b460a75a7ccfdcfaca5393de294b1654c2a29 /src/reqs.c | |
parent | f720244baa0f92c5e8c9500d2cc41415775196fd (diff) |
get_request_entity: respect user-set timeout
get_request_entity() is only called on error, for example if a client
doesn't pass a check_acl() check. in such a case it's possible that
the client fd isn't yet ready to read from.
using select() with a timeout timeval of {0,0} causes it to return
immediately and return 0 if there's no data ready to be read.
this resulted in immediate connection termination rather than returning
the 403 access denied error page to the client and a confusing
"no entity" message displayed in the proxy log.
Diffstat (limited to 'src/reqs.c')
-rw-r--r-- | src/reqs.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1490,7 +1490,7 @@ get_request_entity(struct conn_s *connptr) FD_ZERO (&rset); FD_SET (connptr->client_fd, &rset); - tv.tv_sec = 0; + tv.tv_sec = config->idletimeout; tv.tv_usec = 0; ret = select (connptr->client_fd + 1, &rset, NULL, NULL, &tv); |