Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/yaz
[yaz-moved-to-github.git] / src / uri.c
index ed1350a..cb4fc25 100644 (file)
--- a/src/uri.c
+++ b/src/uri.c
@@ -1,5 +1,5 @@
 /* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2009 Index Data
+ * Copyright (C) 1995-2010 Index Data
  * See the file LICENSE for details.
  */
 /**
@@ -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';