uhttpd: break tight loop when receiving eof during header reading (#7904)

SVN-Revision: 22988
This commit is contained in:
Jo-Philipp Wich
2010-09-09 20:15:02 +00:00
parent 7a54becd63
commit 70dff7070e
2 changed files with 5 additions and 1 deletions

View File

@@ -401,6 +401,10 @@ static struct http_request * uh_http_header_recv(struct client *cl)
{
ensure_out(rlen = uh_tcp_recv(cl, bufptr, rlen));
/* unexpected eof - #7904 */
if( rlen == 0 )
return NULL;
blen -= rlen;
bufptr += rlen;
}