From 86c4a75e2ed9282be2202d9202be7f6a07dd3410 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 23 Nov 2009 14:53:54 +0100 Subject: [PATCH] encode_uri_char: encode blank as %20 --- src/uri.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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'; -- 1.7.10.4