diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2010-05-16 00:28:16 +0100 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2010-05-16 00:28:16 +0100 |
commit | ec86b2232da72f7b0c1c0a217d94b6e15698c795 (patch) | |
tree | 008111e5ae7d47ba5547be974769bd0751ee9fd0 /lib/misc.c | |
parent | ca0981ad1e427644a33fc31fe78d63ea834f0fa0 (diff) | |
parent | 6e6b3d7c7300c5cf5cf7f1538154925fd2fe3953 (diff) |
Mainline merge. (Probably mostly irrelevant for this branch, oh well.)
Diffstat (limited to 'lib/misc.c')
-rw-r--r-- | lib/misc.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -305,8 +305,7 @@ void http_encode( char *s ) for( i = j = 0; t[i]; i ++, j ++ ) { - /* if( t[i] <= ' ' || ((unsigned char *)t)[i] >= 128 || t[i] == '%' ) */ - if( !isalnum( t[i] ) ) + if( !isalnum( t[i] ) && !strchr( "._-~", t[i] ) ) { sprintf( s + j, "%%%02X", ((unsigned char*)t)[i] ); j += 2; |