Commit 3fe32b6
authored
Send query string verbatim when path encoding is disabled (#2479)
set_path_encode(false) only suppressed encoding of the path part. The
query part was always run through normalize_query_string(), which
decodes then re-encodes each key/value pair regardless of the flag.
That round-trip is lossy for pre-encoded payloads: re-encoding emits
sub-delimiters literally (%2C->",", %24->"$", %3B->";", ...) and turns
%20 into "+", which a strict RFC 3986 server decodes back as "+"
(0x2B) rather than a space (0x20), corrupting binary query data.
Honor path_encode_ for the query as well: when disabled, append the
caller-supplied query verbatim. Add a regression test asserting on the
raw request target, since the server decodes "+" as space and would
otherwise mask the difference.1 parent 0ae9388 commit 3fe32b6
2 files changed
Lines changed: 46 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13661 | 13661 | | |
13662 | 13662 | | |
13663 | 13663 | | |
13664 | | - | |
13665 | | - | |
13666 | | - | |
| 13664 | + | |
| 13665 | + | |
| 13666 | + | |
| 13667 | + | |
| 13668 | + | |
| 13669 | + | |
| 13670 | + | |
| 13671 | + | |
| 13672 | + | |
| 13673 | + | |
| 13674 | + | |
| 13675 | + | |
13667 | 13676 | | |
13668 | 13677 | | |
13669 | 13678 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2929 | 2929 | | |
2930 | 2930 | | |
2931 | 2931 | | |
| 2932 | + | |
| 2933 | + | |
| 2934 | + | |
| 2935 | + | |
| 2936 | + | |
| 2937 | + | |
| 2938 | + | |
| 2939 | + | |
| 2940 | + | |
| 2941 | + | |
| 2942 | + | |
| 2943 | + | |
| 2944 | + | |
| 2945 | + | |
| 2946 | + | |
| 2947 | + | |
| 2948 | + | |
| 2949 | + | |
| 2950 | + | |
| 2951 | + | |
| 2952 | + | |
| 2953 | + | |
| 2954 | + | |
| 2955 | + | |
| 2956 | + | |
| 2957 | + | |
| 2958 | + | |
| 2959 | + | |
| 2960 | + | |
| 2961 | + | |
| 2962 | + | |
| 2963 | + | |
| 2964 | + | |
| 2965 | + | |
2932 | 2966 | | |
2933 | 2967 | | |
2934 | 2968 | | |
| |||
0 commit comments