Mercurial > urweb
changeset 2024:6372a742ab04
Allow '+' char in blessMime
See this one [1] for an example
[1] - http://www.w3.org/TR/SVGTiny12/mimereg.html
author | Sergey Mironov <grrwlf@gmail.com> |
---|---|
date | Thu, 05 Jun 2014 20:36:12 +0000 |
parents | e4051315263e |
children | afeeabdcce77 |
files | src/c/urweb.c src/settings.sml |
diffstat | 2 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/c/urweb.c Wed Jun 11 13:56:00 2014 -0400 +++ b/src/c/urweb.c Thu Jun 05 20:36:12 2014 +0000 @@ -3604,7 +3604,7 @@ static int mime_format(const char *s) { for (; *s; ++s) - if (!isalnum((int)*s) && *s != '/' && *s != '-' && *s != '.') + if (!isalnum((int)*s) && *s != '/' && *s != '-' && *s != '.' && *s != '+') return 0; return 1;
--- a/src/settings.sml Wed Jun 11 13:56:00 2014 -0400 +++ b/src/settings.sml Thu Jun 05 20:36:12 2014 +0000 @@ -465,7 +465,7 @@ val checkUrl = check (fn _ => true) url -val validMime = CharVector.all (fn ch => Char.isAlphaNum ch orelse ch = #"/" orelse ch = #"-" orelse ch = #".") +val validMime = CharVector.all (fn ch => Char.isAlphaNum ch orelse ch = #"/" orelse ch = #"-" orelse ch = #"." orelse ch = #"+") val validEnv = CharVector.all (fn ch => Char.isAlphaNum ch orelse ch = #"_" orelse ch = #".") val checkMime = check validMime mime