Fossil SCM
Only process HTTP replies that lack a Content-Length header if the connection is set to be closed. Suggested by [https://bz.apache.org/bugzilla/show_bug.cgi?id=68905].
Commit
71919ad1b542832c615df0af08999c9624ade133f48d0f39448cf87d71fa1142
Parent
670c886e30c315d…
1 file changed
+1
-1
+1
-1
| --- src/http.c | ||
| +++ src/http.c | ||
| @@ -698,11 +698,11 @@ | ||
| 698 | 698 | if( iRecvLen != iLength ){ |
| 699 | 699 | fossil_warning("response truncated: got %d bytes of %d", |
| 700 | 700 | iRecvLen, iLength); |
| 701 | 701 | goto write_err; |
| 702 | 702 | } |
| 703 | - }else{ | |
| 703 | + }else if( closeConnection ){ | |
| 704 | 704 | /* Read content until end-of-file */ |
| 705 | 705 | int iRecvLen; /* Received length of the reply payload */ |
| 706 | 706 | unsigned int nReq = 1000; |
| 707 | 707 | unsigned int nPrior = 0; |
| 708 | 708 | do{ |
| 709 | 709 |
| --- src/http.c | |
| +++ src/http.c | |
| @@ -698,11 +698,11 @@ | |
| 698 | if( iRecvLen != iLength ){ |
| 699 | fossil_warning("response truncated: got %d bytes of %d", |
| 700 | iRecvLen, iLength); |
| 701 | goto write_err; |
| 702 | } |
| 703 | }else{ |
| 704 | /* Read content until end-of-file */ |
| 705 | int iRecvLen; /* Received length of the reply payload */ |
| 706 | unsigned int nReq = 1000; |
| 707 | unsigned int nPrior = 0; |
| 708 | do{ |
| 709 |
| --- src/http.c | |
| +++ src/http.c | |
| @@ -698,11 +698,11 @@ | |
| 698 | if( iRecvLen != iLength ){ |
| 699 | fossil_warning("response truncated: got %d bytes of %d", |
| 700 | iRecvLen, iLength); |
| 701 | goto write_err; |
| 702 | } |
| 703 | }else if( closeConnection ){ |
| 704 | /* Read content until end-of-file */ |
| 705 | int iRecvLen; /* Received length of the reply payload */ |
| 706 | unsigned int nReq = 1000; |
| 707 | unsigned int nPrior = 0; |
| 708 | do{ |
| 709 |