Fossil SCM

Fix bogus error message if connection drops immediately after 1xx reply

danshearer 2026-07-28 01:55 UTC trunk
Commit bd777e5d19d736b96bfe3990eeb1eddb9e65853a515a5f91bfd54886f1bb0be9
1 file changed +1
+1
--- src/http.c
+++ src/http.c
@@ -573,10 +573,11 @@
573573
if( rc/100==1 ){
574574
/* Parse and discard an unexpected 1xx interim reply, most commonly
575575
** "100 Continue". Skip the remaining header lines of the reply.
576576
** A 1xx reply has no body.) */
577577
while( (zLine = transport_receive_line(&g.url))!=0 && zLine[0]!=0 ){}
578
+ iHttpVersion = -1; /* Ensures correct error msg if connection drops */
578579
if( zLine==0 ) goto write_err;
579580
continue;
580581
}
581582
if( rc==401 ){
582583
if( fSeenHttpAuth++ < MAX_HTTP_AUTH ){
583584
--- src/http.c
+++ src/http.c
@@ -573,10 +573,11 @@
573 if( rc/100==1 ){
574 /* Parse and discard an unexpected 1xx interim reply, most commonly
575 ** "100 Continue". Skip the remaining header lines of the reply.
576 ** A 1xx reply has no body.) */
577 while( (zLine = transport_receive_line(&g.url))!=0 && zLine[0]!=0 ){}
 
578 if( zLine==0 ) goto write_err;
579 continue;
580 }
581 if( rc==401 ){
582 if( fSeenHttpAuth++ < MAX_HTTP_AUTH ){
583
--- src/http.c
+++ src/http.c
@@ -573,10 +573,11 @@
573 if( rc/100==1 ){
574 /* Parse and discard an unexpected 1xx interim reply, most commonly
575 ** "100 Continue". Skip the remaining header lines of the reply.
576 ** A 1xx reply has no body.) */
577 while( (zLine = transport_receive_line(&g.url))!=0 && zLine[0]!=0 ){}
578 iHttpVersion = -1; /* Ensures correct error msg if connection drops */
579 if( zLine==0 ) goto write_err;
580 continue;
581 }
582 if( rc==401 ){
583 if( fSeenHttpAuth++ < MAX_HTTP_AUTH ){
584

Keyboard Shortcuts

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