Fossil SCM
Remove the '; charset=utf-8' suffix from response Content-Type headers. That modifier is technically incorrect for many mimetypes, but wasm loaders are extra picky about it and refuse to load wasm files with the charset set. An attempt at porting over althttpd's solution for this same problem leads down a much deeper and far more invasive rabbit hole because how fossil handles/sets the response content type is more involved than in althttpd.
Commit
15e7b49ef3277b0638988228c7c8c4670e44ff0fef788fda1d4bc0268375dc6c
Parent
e65544571e21c70…
1 file changed
+1
-1
+1
-1
| --- src/cgi.c | ||
| +++ src/cgi.c | ||
| @@ -493,11 +493,11 @@ | ||
| 493 | 493 | |
| 494 | 494 | /* Content intended for logged in users should only be cached in |
| 495 | 495 | ** the browser, not some shared location. |
| 496 | 496 | */ |
| 497 | 497 | if( iReplyStatus!=304 ) { |
| 498 | - blob_appendf(&hdr, "Content-Type: %s; charset=utf-8\r\n", zContentType); | |
| 498 | + blob_appendf(&hdr, "Content-Type: %s\r\n", zContentType); | |
| 499 | 499 | if( fossil_strcmp(zContentType,"application/x-fossil")==0 ){ |
| 500 | 500 | cgi_combine_header_and_body(); |
| 501 | 501 | blob_compress(&cgiContent[0], &cgiContent[0]); |
| 502 | 502 | } |
| 503 | 503 | |
| 504 | 504 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -493,11 +493,11 @@ | |
| 493 | |
| 494 | /* Content intended for logged in users should only be cached in |
| 495 | ** the browser, not some shared location. |
| 496 | */ |
| 497 | if( iReplyStatus!=304 ) { |
| 498 | blob_appendf(&hdr, "Content-Type: %s; charset=utf-8\r\n", zContentType); |
| 499 | if( fossil_strcmp(zContentType,"application/x-fossil")==0 ){ |
| 500 | cgi_combine_header_and_body(); |
| 501 | blob_compress(&cgiContent[0], &cgiContent[0]); |
| 502 | } |
| 503 | |
| 504 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -493,11 +493,11 @@ | |
| 493 | |
| 494 | /* Content intended for logged in users should only be cached in |
| 495 | ** the browser, not some shared location. |
| 496 | */ |
| 497 | if( iReplyStatus!=304 ) { |
| 498 | blob_appendf(&hdr, "Content-Type: %s\r\n", zContentType); |
| 499 | if( fossil_strcmp(zContentType,"application/x-fossil")==0 ){ |
| 500 | cgi_combine_header_and_body(); |
| 501 | blob_compress(&cgiContent[0], &cgiContent[0]); |
| 502 | } |
| 503 | |
| 504 |