QueryParams.__str__ does not round-trip %
characters from input
#3135
Unanswered
jhominal
asked this question in
Potential Issue
Replies: 1 comment 5 replies
-
@encode/maintainers I would really like some kind of reply on this discussion, especially given that there is already pending PR #3141 which, in my opinion, is at least a neighbor of the underlying issue. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The issue is similar to #3094 but there is a case to be made that the behavior in the other discussion may be working as intended.
However, I currently have an issue that
%
does not roundtrip when usinghttpx.QueryParams
:QueryParams.__init__
will decode a%25
sequence in astr
to%
;QueryParams.__str__
considers%
as being "safe", so will not reencode%
to%25
;This has the following consequences:
This issue is particularly notable when using e.g.
URL.copy_add_param
and its related functions, as they rely onQueryParams.__str__
round-tripping back to its original value:I believe that this behavior is a bug in httpx and should be resolved.
The potential bug described here was, as far as I can tell, introduced in
httpx
version 0.24.0.Beta Was this translation helpful? Give feedback.
All reactions