Fossil SCM
Revise the order of error messages so that simple HTTP timeout produces a better diagnostic.
Commit
dd71069bfe01f643f28d59eecd9369f072c425d2
Parent
81c685e0976c5a9…
1 file changed
+4
-4
+4
-4
| --- src/http.c | ||
| +++ src/http.c | ||
| @@ -253,22 +253,22 @@ | ||
| 253 | 253 | }else if( fossil_strnicmp(&zLine[14], "application/x-fossil", -1)!=0 ){ |
| 254 | 254 | isError = 1; |
| 255 | 255 | } |
| 256 | 256 | } |
| 257 | 257 | } |
| 258 | + if( iLength<0 ){ | |
| 259 | + fossil_fatal("server did not reply"); | |
| 260 | + goto write_err; | |
| 261 | + } | |
| 258 | 262 | if( rc!=200 ){ |
| 259 | 263 | fossil_warning("\"location:\" missing from 302 redirect reply"); |
| 260 | 264 | goto write_err; |
| 261 | 265 | } |
| 262 | 266 | |
| 263 | 267 | /* |
| 264 | 268 | ** Extract the reply payload that follows the header |
| 265 | 269 | */ |
| 266 | - if( iLength<0 ){ | |
| 267 | - fossil_fatal("server did not reply"); | |
| 268 | - goto write_err; | |
| 269 | - } | |
| 270 | 270 | blob_zero(pReply); |
| 271 | 271 | blob_resize(pReply, iLength); |
| 272 | 272 | iLength = transport_receive(blob_buffer(pReply), iLength); |
| 273 | 273 | blob_resize(pReply, iLength); |
| 274 | 274 | if( isError ){ |
| 275 | 275 |
| --- src/http.c | |
| +++ src/http.c | |
| @@ -253,22 +253,22 @@ | |
| 253 | }else if( fossil_strnicmp(&zLine[14], "application/x-fossil", -1)!=0 ){ |
| 254 | isError = 1; |
| 255 | } |
| 256 | } |
| 257 | } |
| 258 | if( rc!=200 ){ |
| 259 | fossil_warning("\"location:\" missing from 302 redirect reply"); |
| 260 | goto write_err; |
| 261 | } |
| 262 | |
| 263 | /* |
| 264 | ** Extract the reply payload that follows the header |
| 265 | */ |
| 266 | if( iLength<0 ){ |
| 267 | fossil_fatal("server did not reply"); |
| 268 | goto write_err; |
| 269 | } |
| 270 | blob_zero(pReply); |
| 271 | blob_resize(pReply, iLength); |
| 272 | iLength = transport_receive(blob_buffer(pReply), iLength); |
| 273 | blob_resize(pReply, iLength); |
| 274 | if( isError ){ |
| 275 |
| --- src/http.c | |
| +++ src/http.c | |
| @@ -253,22 +253,22 @@ | |
| 253 | }else if( fossil_strnicmp(&zLine[14], "application/x-fossil", -1)!=0 ){ |
| 254 | isError = 1; |
| 255 | } |
| 256 | } |
| 257 | } |
| 258 | if( iLength<0 ){ |
| 259 | fossil_fatal("server did not reply"); |
| 260 | goto write_err; |
| 261 | } |
| 262 | if( rc!=200 ){ |
| 263 | fossil_warning("\"location:\" missing from 302 redirect reply"); |
| 264 | goto write_err; |
| 265 | } |
| 266 | |
| 267 | /* |
| 268 | ** Extract the reply payload that follows the header |
| 269 | */ |
| 270 | blob_zero(pReply); |
| 271 | blob_resize(pReply, iLength); |
| 272 | iLength = transport_receive(blob_buffer(pReply), iLength); |
| 273 | blob_resize(pReply, iLength); |
| 274 | if( isError ){ |
| 275 |