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].

drh 2024-04-17 13:27 trunk
Commit 71919ad1b542832c615df0af08999c9624ade133f48d0f39448cf87d71fa1142
1 file changed +1 -1
+1 -1
--- src/http.c
+++ src/http.c
@@ -698,11 +698,11 @@
698698
if( iRecvLen != iLength ){
699699
fossil_warning("response truncated: got %d bytes of %d",
700700
iRecvLen, iLength);
701701
goto write_err;
702702
}
703
- }else{
703
+ }else if( closeConnection ){
704704
/* Read content until end-of-file */
705705
int iRecvLen; /* Received length of the reply payload */
706706
unsigned int nReq = 1000;
707707
unsigned int nPrior = 0;
708708
do{
709709
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button