Fossil SCM

Change the HTTP reply status for range requests from "206 OK" to "206 Partial Content".

florian 2020-03-18 14:14 audio-captcha
Commit 8a1e1c9096793aab3de08dc66e5ccef892c792bdaf3f9a94afd1db823ac96b14
1 file changed +1
+1
--- src/cgi.c
+++ src/cgi.c
@@ -279,10 +279,11 @@
279279
if( rangeEnd>0
280280
&& iReplyStatus==200
281281
&& fossil_strcmp(P("REQUEST_METHOD"),"GET")==0
282282
){
283283
iReplyStatus = 206;
284
+ zReplyStatus = "Partial Content";
284285
}
285286
fprintf(g.httpOut, "HTTP/1.0 %d %s\r\n", iReplyStatus, zReplyStatus);
286287
fprintf(g.httpOut, "Date: %s\r\n", cgi_rfc822_datestamp(time(0)));
287288
fprintf(g.httpOut, "Connection: close\r\n");
288289
fprintf(g.httpOut, "X-UA-Compatible: IE=edge\r\n");
289290
--- src/cgi.c
+++ src/cgi.c
@@ -279,10 +279,11 @@
279 if( rangeEnd>0
280 && iReplyStatus==200
281 && fossil_strcmp(P("REQUEST_METHOD"),"GET")==0
282 ){
283 iReplyStatus = 206;
 
284 }
285 fprintf(g.httpOut, "HTTP/1.0 %d %s\r\n", iReplyStatus, zReplyStatus);
286 fprintf(g.httpOut, "Date: %s\r\n", cgi_rfc822_datestamp(time(0)));
287 fprintf(g.httpOut, "Connection: close\r\n");
288 fprintf(g.httpOut, "X-UA-Compatible: IE=edge\r\n");
289
--- src/cgi.c
+++ src/cgi.c
@@ -279,10 +279,11 @@
279 if( rangeEnd>0
280 && iReplyStatus==200
281 && fossil_strcmp(P("REQUEST_METHOD"),"GET")==0
282 ){
283 iReplyStatus = 206;
284 zReplyStatus = "Partial Content";
285 }
286 fprintf(g.httpOut, "HTTP/1.0 %d %s\r\n", iReplyStatus, zReplyStatus);
287 fprintf(g.httpOut, "Date: %s\r\n", cgi_rfc822_datestamp(time(0)));
288 fprintf(g.httpOut, "Connection: close\r\n");
289 fprintf(g.httpOut, "X-UA-Compatible: IE=edge\r\n");
290

Keyboard Shortcuts

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