projects
/
yaz-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
54dc5b4
)
encode_uri_char: encode blank as %20
author
Adam Dickmeiss
<adam@indexdata.dk>
Mon, 23 Nov 2009 13:53:54 +0000
(14:53 +0100)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Mon, 23 Nov 2009 13:53:54 +0000
(14:53 +0100)
src/uri.c
patch
|
blob
|
history
diff --git
a/src/uri.c
b/src/uri.c
index
ed1350a
..
c05a054
100644
(file)
--- 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';