Skip to content

Commit 18c0256

Browse files
committed
Do not URLencode '.' or '~'. Closes #103
1 parent 7fbde04 commit 18c0256

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

http.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1259,22 +1259,23 @@ Datum http_request(PG_FUNCTION_ARGS)
12591259

12601260

12611261
/* URL Encode Escape Chars */
1262-
/* 48-57 (0-9) 65-90 (A-Z) 97-122 (a-z) 95 (_) 45 (-) */
1262+
/* 45-46 (-.) 48-57 (0-9) 65-90 (A-Z) */
1263+
/* 95 (_) 97-122 (a-z) 126 (~) */
12631264

12641265
static int chars_to_not_encode[] = {
12651266
0,0,0,0,0,0,0,0,0,0,
12661267
0,0,0,0,0,0,0,0,0,0,
12671268
0,0,0,0,0,0,0,0,0,0,
12681269
0,0,0,0,0,0,0,0,0,0,
1269-
0,0,0,0,0,1,0,0,1,1,
1270+
0,0,0,0,0,1,1,0,1,1,
12701271
1,1,1,1,1,1,1,1,0,0,
12711272
0,0,0,0,0,1,1,1,1,1,
12721273
1,1,1,1,1,1,1,1,1,1,
12731274
1,1,1,1,1,1,1,1,1,1,
12741275
1,0,0,0,0,1,0,1,1,1,
12751276
1,1,1,1,1,1,1,1,1,1,
12761277
1,1,1,1,1,1,1,1,1,1,
1277-
1,1,1,0,0,0,0,0
1278+
1,1,1,0,0,0,1,0
12781279
};
12791280

12801281

0 commit comments

Comments
 (0)