Skip to content

urlapi: change more lowercase percent-encoded to uppercase#21592

Closed
bagder wants to merge 3 commits into
masterfrom
bagder/percent-uppercase
Closed

urlapi: change more lowercase percent-encoded to uppercase#21592
bagder wants to merge 3 commits into
masterfrom
bagder/percent-uppercase

Conversation

@bagder

@bagder bagder commented May 13, 2026

Copy link
Copy Markdown
Member

For consistency with other code, prefer uppercase.

Verified by test 1628
Reported-by: Fabian Keil
URL: https://curl.se/mail/lib-2026-05/0006.html

For consistency with other code, prefer uppercase.

Verified by test 1628
Reported-by: Fabian Keil
URL: https://curl.se/mail/lib-2026-05/0006.html
@github-actions github-actions Bot added the tests label May 13, 2026
@bagder bagder marked this pull request as ready for review May 13, 2026 14:22
@bagder bagder requested a review from Copilot May 13, 2026 14:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR standardizes percent-encoded triplets to use uppercase hex in the URL API output for consistency, and updates/adds regression tests to match and verify the new normalization behavior.

Changes:

  • Normalize existing percent-encoded sequences to uppercase when setting URL parts without CURLU_URLENCODE (lib/urlapi.c).
  • Update URL API unit test expectations to match uppercase normalization (tests/libtest/lib1560.c).
  • Update an existing test expectation and add a new proxy PUT test to verify uppercase encoding in generated request URLs (tests/data/test1221, tests/data/test1628), and register the new test in the test data makefile (tests/data/Makefile.am).

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
lib/urlapi.c Switches normalization of percent-encoded hex to uppercase when copying raw input parts.
tests/libtest/lib1560.c Adjusts URL API set/get test case to expect uppercase percent-encoding.
tests/data/test1221 Updates expected request line to match uppercase percent-encoding in query building.
tests/data/test1628 Adds a new regression test verifying uppercase percent-encoding in proxy absolute-form PUT request URLs.
tests/data/Makefile.am Registers test1628 so it is included in the test suite.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@bagder bagder closed this in 675a9b0 May 13, 2026
@bagder bagder deleted the bagder/percent-uppercase branch May 13, 2026 14:47
outcast36 pushed a commit to greearb/curl that referenced this pull request Jun 3, 2026
For consistency with other code, prefer uppercase.

Verified by test 1628
Reported-by: Fabian Keil
URL: https://curl.se/mail/lib-2026-05/0006.html
Closes curl#21592
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants