Fossil SCM

Fix an off-by-one error in the previous check-in

drh 2026-07-25 11:11 UTC http1-1-chunked
Commit 9b686daeeda7b4ca1f7857ffe61368c3a6de0ffb58899c3967dcdfb4afd2fa92
1 file changed +1 -1
+1 -1
--- src/http.c
+++ src/http.c
@@ -612,11 +612,11 @@
612612
}else if( fossil_strnicmp(zLine, "transfer-encoding:", 18)==0 ){
613613
/* RFC 7230: "chunked" must be the final transfer-coding so only
614614
** match when it appears at the end of the line. */
615615
if( sqlite3_strlike("%chunked", &zLine[18], 0)==0 ){
616616
size_t nx = strlen(&zLine[18]);
617
- if( !fossil_isalnum(zLine[nx+11]) ) isChunked = 1;
617
+ if( !fossil_isalnum(zLine[nx+10]) ) isChunked = 1;
618618
}
619619
}else if( fossil_strnicmp(zLine, "connection:", 11)==0 ){
620620
if( sqlite3_strlike("%close%", &zLine[11], 0)==0 ){
621621
closeConnection = 1;
622622
}else if( sqlite3_strlike("%keep-alive%", &zLine[11], 0)==0 ){
623623
--- src/http.c
+++ src/http.c
@@ -612,11 +612,11 @@
612 }else if( fossil_strnicmp(zLine, "transfer-encoding:", 18)==0 ){
613 /* RFC 7230: "chunked" must be the final transfer-coding so only
614 ** match when it appears at the end of the line. */
615 if( sqlite3_strlike("%chunked", &zLine[18], 0)==0 ){
616 size_t nx = strlen(&zLine[18]);
617 if( !fossil_isalnum(zLine[nx+11]) ) isChunked = 1;
618 }
619 }else if( fossil_strnicmp(zLine, "connection:", 11)==0 ){
620 if( sqlite3_strlike("%close%", &zLine[11], 0)==0 ){
621 closeConnection = 1;
622 }else if( sqlite3_strlike("%keep-alive%", &zLine[11], 0)==0 ){
623
--- src/http.c
+++ src/http.c
@@ -612,11 +612,11 @@
612 }else if( fossil_strnicmp(zLine, "transfer-encoding:", 18)==0 ){
613 /* RFC 7230: "chunked" must be the final transfer-coding so only
614 ** match when it appears at the end of the line. */
615 if( sqlite3_strlike("%chunked", &zLine[18], 0)==0 ){
616 size_t nx = strlen(&zLine[18]);
617 if( !fossil_isalnum(zLine[nx+10]) ) isChunked = 1;
618 }
619 }else if( fossil_strnicmp(zLine, "connection:", 11)==0 ){
620 if( sqlite3_strlike("%close%", &zLine[11], 0)==0 ){
621 closeConnection = 1;
622 }else if( sqlite3_strlike("%keep-alive%", &zLine[11], 0)==0 ){
623

Keyboard Shortcuts

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