Fossil SCM

Do not try to uncompress generic HTTP content when the NOCOMPRESS flag is set.

drh 2022-02-18 22:05 trunk
Commit 66ef9061183de74d4959e42669e294cadc01cb3521da3f067a4ce6b1d08a09ad
1 file changed +3 -3
+3 -3
--- src/http.c
+++ src/http.c
@@ -454,13 +454,13 @@
454454
isCompressed = 0;
455455
}else if( fossil_strnicmp(&zLine[14],
456456
"application/x-fossil-uncompressed", -1)==0 ){
457457
isCompressed = 0;
458458
}else{
459
- if( (mHttpFlags & HTTP_GENERIC)==0
460
- && fossil_strnicmp(&zLine[14], "application/x-fossil", -1)!=0
461
- ){
459
+ if( mHttpFlags & HTTP_GENERIC ){
460
+ if( mHttpFlags & HTTP_NOCOMPRESS ) isCompressed = 0;
461
+ }else if( fossil_strnicmp(&zLine[14], "application/x-fossil", -1)!=0 ){
462462
isError = 1;
463463
}
464464
}
465465
}
466466
}
467467
--- src/http.c
+++ src/http.c
@@ -454,13 +454,13 @@
454 isCompressed = 0;
455 }else if( fossil_strnicmp(&zLine[14],
456 "application/x-fossil-uncompressed", -1)==0 ){
457 isCompressed = 0;
458 }else{
459 if( (mHttpFlags & HTTP_GENERIC)==0
460 && fossil_strnicmp(&zLine[14], "application/x-fossil", -1)!=0
461 ){
462 isError = 1;
463 }
464 }
465 }
466 }
467
--- src/http.c
+++ src/http.c
@@ -454,13 +454,13 @@
454 isCompressed = 0;
455 }else if( fossil_strnicmp(&zLine[14],
456 "application/x-fossil-uncompressed", -1)==0 ){
457 isCompressed = 0;
458 }else{
459 if( mHttpFlags & HTTP_GENERIC ){
460 if( mHttpFlags & HTTP_NOCOMPRESS ) isCompressed = 0;
461 }else if( fossil_strnicmp(&zLine[14], "application/x-fossil", -1)!=0 ){
462 isError = 1;
463 }
464 }
465 }
466 }
467

Keyboard Shortcuts

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