Skip to content

Commit

Permalink
Do not URLencode '.' or '~'. Closes #103
Browse files Browse the repository at this point in the history
  • Loading branch information
pramsey committed Aug 1, 2019
1 parent 7fbde04 commit 18c0256
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions http.c
Original file line number Diff line number Diff line change
Expand Up @@ -1259,22 +1259,23 @@ 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,
1,1,1,1,1,1,1,1,1,1,
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
};


Expand Down

0 comments on commit 18c0256

Please # to comment.