Fossil SCM
Fix bogus error message if connection drops immediately after 1xx reply
Commit
bd777e5d19d736b96bfe3990eeb1eddb9e65853a515a5f91bfd54886f1bb0be9
Parent
2cdf86fcbff1876…
1 file changed
+1
+1
| --- src/http.c | ||
| +++ src/http.c | ||
| @@ -573,10 +573,11 @@ | ||
| 573 | 573 | if( rc/100==1 ){ |
| 574 | 574 | /* Parse and discard an unexpected 1xx interim reply, most commonly |
| 575 | 575 | ** "100 Continue". Skip the remaining header lines of the reply. |
| 576 | 576 | ** A 1xx reply has no body.) */ |
| 577 | 577 | while( (zLine = transport_receive_line(&g.url))!=0 && zLine[0]!=0 ){} |
| 578 | + iHttpVersion = -1; /* Ensures correct error msg if connection drops */ | |
| 578 | 579 | if( zLine==0 ) goto write_err; |
| 579 | 580 | continue; |
| 580 | 581 | } |
| 581 | 582 | if( rc==401 ){ |
| 582 | 583 | if( fSeenHttpAuth++ < MAX_HTTP_AUTH ){ |
| 583 | 584 |
| --- 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 |