X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fsrwutil.c;h=7be212a43f904cefe9cffd9ceda3f3cac3f9a250;hp=5a4f5760ee7865946eb9592a48e4f412edf60736;hb=406ec3b354a9260bf09cc80c540d3d19845dc915;hpb=cbe9e3611ef12ee0dd00ce6170d5b46f8a331d8a diff --git a/src/srwutil.c b/src/srwutil.c index 5a4f576..7be212a 100644 --- a/src/srwutil.c +++ b/src/srwutil.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2013 Index Data + * Copyright (C) Index Data * See the file LICENSE for details. */ /** @@ -242,6 +242,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++];