-
Notifications
You must be signed in to change notification settings - Fork 40
bitreq: Remove urlencoding dependence #424
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
tcharding
merged 7 commits into
rust-bitcoin:master
from
jamillambert:1126-remove-urlencoding
Dec 8, 2025
Merged
bitreq: Remove urlencoding dependence #424
tcharding
merged 7 commits into
rust-bitcoin:master
from
jamillambert:1126-remove-urlencoding
Dec 8, 2025
+76
−112
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Create a separate function that does the percent encoding of a single character for future use in the request URL encoding.
Functionality is the same. Refactor only.
7d2eabb to
73041aa
Compare
The whole http_url module was feature gated on std. This prevents using the percent-encoding functions in no_std environments. Remove the feature gate from the module and instead gate only the individual functions that require std.
Create a new function percent_encode_string to encode entire strings. Use this instead of urlencoding::encode.
73041aa to
2911152
Compare
There is no longer a dependency on the urlencoding crate. Remove the feature and all related feature gates and comments.
2911152 to
0357727
Compare
tcharding
approved these changes
Dec 8, 2025
Member
tcharding
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 0357727
Member
|
FTR the mutable output paramaters are a bit C-like instead of being Rusty but I"m ok with this for now. Just mentioning it. |
Member
|
Sorry for taking so long mate. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
bitreqhas ahttp_urlmodule that has encoding functionality butrequestdepends onurlencodingto do the encoding.http_urlcan be expanded to do all of the encoding and then the dependence onurlencodingis not needed anymore. Addresses one of the points in #402.HttpUrl::parsefunction into its own function.stdfeature gate off thehttp_urlmodule and onto the individual items in it so that the character encoding function can be accessed in a no-std build.urlencodingin request with the character encoding inhttp_urlby adding a string parser that calls the existing char parser. Remove theurlencodingdependence.urlencodingfeature. This was done separately to the previous patch in case it should instead be left in.