Fossil SCM

Allow the plus sign in MIME types again, needed for example in 'application/rss+xml'.

danield 2025-09-02 22:10 trunk
Commit 639c040474d6bae3e7b1253885364b410d1802e04596883d9b532a211077eb90
1 file changed +1 -1
+1 -1
--- src/cgi.c
+++ src/cgi.c
@@ -257,11 +257,11 @@
257257
** changed (by calling this routine) in the exceptional case where some
258258
** other content type is being returned.
259259
*/
260260
void cgi_set_content_type(const char *zType){
261261
int i;
262
- for(i=0; zType[i]>='-' && zType[i]<='z'; i++){}
262
+ for(i=0; zType[i]=='+' || zType[i]>='-' && zType[i]<='z'; i++){}
263263
zReplyMimeType = fossil_strndup(zType, i);
264264
}
265265
266266
/*
267267
** Erase any existing reply content. Replace is with a pNewContent.
268268
--- src/cgi.c
+++ src/cgi.c
@@ -257,11 +257,11 @@
257 ** changed (by calling this routine) in the exceptional case where some
258 ** other content type is being returned.
259 */
260 void cgi_set_content_type(const char *zType){
261 int i;
262 for(i=0; zType[i]>='-' && zType[i]<='z'; i++){}
263 zReplyMimeType = fossil_strndup(zType, i);
264 }
265
266 /*
267 ** Erase any existing reply content. Replace is with a pNewContent.
268
--- src/cgi.c
+++ src/cgi.c
@@ -257,11 +257,11 @@
257 ** changed (by calling this routine) in the exceptional case where some
258 ** other content type is being returned.
259 */
260 void cgi_set_content_type(const char *zType){
261 int i;
262 for(i=0; zType[i]=='+' || zType[i]>='-' && zType[i]<='z'; i++){}
263 zReplyMimeType = fossil_strndup(zType, i);
264 }
265
266 /*
267 ** Erase any existing reply content. Replace is with a pNewContent.
268

Keyboard Shortcuts

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