Fossil SCM

Revise the order of error messages so that simple HTTP timeout produces a better diagnostic.

mistachkin 2012-01-20 17:16 UTC clientSyncLeakFix
Commit dd71069bfe01f643f28d59eecd9369f072c425d2
1 file changed +4 -4
+4 -4
--- src/http.c
+++ src/http.c
@@ -253,22 +253,22 @@
253253
}else if( fossil_strnicmp(&zLine[14], "application/x-fossil", -1)!=0 ){
254254
isError = 1;
255255
}
256256
}
257257
}
258
+ if( iLength<0 ){
259
+ fossil_fatal("server did not reply");
260
+ goto write_err;
261
+ }
258262
if( rc!=200 ){
259263
fossil_warning("\"location:\" missing from 302 redirect reply");
260264
goto write_err;
261265
}
262266
263267
/*
264268
** Extract the reply payload that follows the header
265269
*/
266
- if( iLength<0 ){
267
- fossil_fatal("server did not reply");
268
- goto write_err;
269
- }
270270
blob_zero(pReply);
271271
blob_resize(pReply, iLength);
272272
iLength = transport_receive(blob_buffer(pReply), iLength);
273273
blob_resize(pReply, iLength);
274274
if( isError ){
275275
--- 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

Keyboard Shortcuts

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