Skip to content

Conversation

@jamillambert
Copy link
Collaborator

@jamillambert jamillambert commented Nov 26, 2025

bitreq has a http_url module that has encoding functionality but request depends on urlencoding to do the encoding. http_url can be expanded to do all of the encoding and then the dependence on urlencoding is not needed anymore. Addresses one of the points in #402.

  • Format master
  • Split out the character encoding from the HttpUrl::parse function into its own function.
  • Refactor the character encoding function.
  • Move the std feature gate off the http_url module and onto the individual items in it so that the character encoding function can be accessed in a no-std build.
  • Replace the use of urlencoding in request with the character encoding in http_url by adding a string parser that calls the existing char parser. Remove the urlencoding dependence.
  • Remove the urlencoding feature. This was done separately to the previous patch in case it should instead be left in.
  • Update the lock files.

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.
@jamillambert jamillambert force-pushed the 1126-remove-urlencoding branch from 7d2eabb to 73041aa Compare November 26, 2025 17:35
@jamillambert jamillambert marked this pull request as draft November 26, 2025 17:43
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.
@jamillambert jamillambert force-pushed the 1126-remove-urlencoding branch from 73041aa to 2911152 Compare November 26, 2025 21:17
There is no longer a dependency on the urlencoding crate.

Remove the feature and all related feature gates and comments.
@jamillambert jamillambert force-pushed the 1126-remove-urlencoding branch from 2911152 to 0357727 Compare November 26, 2025 21:25
@jamillambert jamillambert marked this pull request as ready for review November 26, 2025 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant