summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorXavier Roche <xroche@users.noreply.github.com>2012-05-05 14:10:25 +0000
committerXavier Roche <xroche@users.noreply.github.com>2012-05-05 14:10:25 +0000
commit78a63125160c4df021b7be08761435b5cc0f5f2f (patch)
treecc9662fe9cc4c719b629c2597611623379a8e253 /src
parent9112768bbe353ee50c0414a4260b1219d3064b57 (diff)
Escape characters >= 128 when sending GET/HEAD requests using %XX (standard browsers behavior)
Diffstat (limited to 'src')
-rw-r--r--src/htslib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/htslib.c b/src/htslib.c
index 8db1273..c2fcc7d 100644
--- a/src/htslib.c
+++ b/src/htslib.c
@@ -3805,7 +3805,7 @@ HTSEXT_API void x_escape_http(char* s,int mode) {
while(*s) {
int test=0;
if (mode == 0)
- test=(strchr("\" ",*s)!=0);
+ test=(strchr("\" ",*s)!=0 || CHAR_SPECIAL(*s));
else if (mode==1) {
test = ( CHAR_RESERVED(*s)
|| CHAR_DELIM(*s)