From: Adam Dickmeiss Date: Tue, 8 Oct 2013 09:41:27 +0000 (+0200) Subject: Fix Content-Type charser fix for non-quoted mode X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=428589ef5c780c3a53da2329278b0375e287bda6;p=yaz-moved-to-github.git Fix Content-Type charser fix for non-quoted mode --- diff --git a/src/srwutil.c b/src/srwutil.c index ef8eead..b372b03 100644 --- a/src/srwutil.c +++ b/src/srwutil.c @@ -249,6 +249,8 @@ static void grab_charset(ODR o, const char *content_type, char **charset) *charset = odr_strdup(o, charset_p); while (charset_p[i] && charset_p[i] != sep) { + if (!sep && strchr("; \n\r", charset_p[i])) + break; if (charset_p[i] == '\\' && charset_p[i+1]) i++; (*charset)[j++] = charset_p[i++];