aboutsummaryrefslogtreecommitdiffstats
path: root/lib/misc.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2010-04-28 08:44:45 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2010-04-28 08:44:45 +0100
commit23784065e6e4de2e77bd1793a92ed3dbb73b5203 (patch)
tree08caeca17ec3eb646f5d83a39877ed078908c5bc /lib/misc.c
parentf1b7711f566163ff27a8f13ae3ccc7214a24fe70 (diff)
parent3f668e478bbaa062cf6b01e627cb39885200e5ff (diff)
Merging OAuth branch. It should be stable now and is documented.
Diffstat (limited to 'lib/misc.c')
-rw-r--r--lib/misc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/misc.c b/lib/misc.c
index 1d36d639..c56b31f3 100644
--- a/lib/misc.c
+++ b/lib/misc.c
@@ -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;