Fossil SCM
Allow the plus sign in MIME types again, needed for example in 'application/rss+xml'.
Commit
639c040474d6bae3e7b1253885364b410d1802e04596883d9b532a211077eb90
Parent
65448438e85fa09…
1 file changed
+1
-1
+1
-1
| --- src/cgi.c | ||
| +++ src/cgi.c | ||
| @@ -257,11 +257,11 @@ | ||
| 257 | 257 | ** changed (by calling this routine) in the exceptional case where some |
| 258 | 258 | ** other content type is being returned. |
| 259 | 259 | */ |
| 260 | 260 | void cgi_set_content_type(const char *zType){ |
| 261 | 261 | int i; |
| 262 | - for(i=0; zType[i]>='-' && zType[i]<='z'; i++){} | |
| 262 | + for(i=0; zType[i]=='+' || zType[i]>='-' && zType[i]<='z'; i++){} | |
| 263 | 263 | zReplyMimeType = fossil_strndup(zType, i); |
| 264 | 264 | } |
| 265 | 265 | |
| 266 | 266 | /* |
| 267 | 267 | ** Erase any existing reply content. Replace is with a pNewContent. |
| 268 | 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]<='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 |