From 18c0256c588b948af75d22a98d6e120dac5c382f Mon Sep 17 00:00:00 2001 From: Paul Ramsey Date: Thu, 1 Aug 2019 09:37:35 -0700 Subject: [PATCH] Do not URLencode '.' or '~'. Closes #103 --- http.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/http.c b/http.c index 8d693e0..50b50f3 100644 --- a/http.c +++ b/http.c @@ -1259,14 +1259,15 @@ Datum http_request(PG_FUNCTION_ARGS) /* URL Encode Escape Chars */ -/* 48-57 (0-9) 65-90 (A-Z) 97-122 (a-z) 95 (_) 45 (-) */ +/* 45-46 (-.) 48-57 (0-9) 65-90 (A-Z) */ +/* 95 (_) 97-122 (a-z) 126 (~) */ static int chars_to_not_encode[] = { 0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,1,0,0,1,1, + 0,0,0,0,0,1,1,0,1,1, 1,1,1,1,1,1,1,1,0,0, 0,0,0,0,0,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1, @@ -1274,7 +1275,7 @@ static int chars_to_not_encode[] = { 1,0,0,0,0,1,0,1,1,1, 1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1, - 1,1,1,0,0,0,0,0 + 1,1,1,0,0,0,1,0 };