/* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2013 Index Data
+ * Copyright (C) Index Data
* See the file LICENSE for details.
*/
/**
*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++];
path = (char *)
odr_malloc(encode, strlen(hreq->path) + strlen(uri_args) + 4);
- sprintf(path, "%s?%s", hreq->path, uri_args);
+ sprintf(path, "%s%c%s", hreq->path, strchr(hreq->path, '?') ? '&' : '?',
+ uri_args);
hreq->path = path;
z_HTTP_header_add_content_type(encode, &hreq->headers,