From: Adam Dickmeiss Date: Mon, 23 Nov 2009 13:53:54 +0000 (+0100) Subject: encode_uri_char: encode blank as %20 X-Git-Tag: v3.0.51~9 X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=commitdiff_plain;h=86c4a75e2ed9282be2202d9202be7f6a07dd3410 encode_uri_char: encode blank as %20 --- diff --git a/src/uri.c b/src/uri.c index ed1350a..c05a054 100644 --- a/src/uri.c +++ b/src/uri.c @@ -25,11 +25,9 @@ static int hex_digit (int ch) static void encode_uri_char(char *dst, char ch) { - if (ch == ' ') - strcpy(dst, "+"); /* mark = "-" | "_" | "." | "!" | "~" | "*" | "'" | "(" | ")" */ - else if ((ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z') || - (ch >= '0' && ch <= '9') || strchr("-_.!~*'(|)", ch)) + if ((ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z') || + (ch >= '0' && ch <= '9') || strchr("-_.!~*'(|)", ch)) { dst[0] = ch; dst[1] = '\0';