X-Git-Url: https://ruderich.org/simon/gitweb/?p=tlsproxy%2Ftlsproxy.git;a=blobdiff_plain;f=src%2Fconnection.c;h=c91eae358e6a3b7cfa44376afba42c928e96ff6b;hp=2b0f5d55c8ec3ea30cf499c2adaedde60d0a9169;hb=f012f75b2ed64fe9955b1dc2013c06e054bafd7f;hpb=58285cca7e83d885f20d34168158a39709fd352b diff --git a/src/connection.c b/src/connection.c index 2b0f5d5..c91eae3 100644 --- a/src/connection.c +++ b/src/connection.c @@ -571,6 +571,8 @@ static int read_http_request(FILE *client_fd, char *request, size_t length) { if (ferror(client_fd)) { LOG_PERROR(WARNING, "read_http_request(): fgets()"); return -1; + } else if (feof(client_fd)) { + return -2; } if (global_http_digest_authorization != NULL && !found_proxy_authorization) {