Skip to content

Preserve URL case in HTTP target requests#1484

Merged
romanlutz merged 1 commit intoAzure:mainfrom
biefan:preserve-http-target-url-case
Mar 17, 2026
Merged

Preserve URL case in HTTP target requests#1484
romanlutz merged 1 commit intoAzure:mainfrom
biefan:preserve-http-target-url-case

Conversation

@biefan
Copy link
Contributor

@biefan biefan commented Mar 16, 2026

Summary

  • preserve the original path/query casing when HTTPTarget builds a request URL
  • add regression coverage for both relative request targets and already-absolute URLs

Problem

HTTPTarget._infer_full_url_from_host() lowercases the entire request target before checking whether it is already an absolute URL. That means any case-sensitive path or query string is rewritten before the request is sent.

Examples that currently change unexpectedly:

  • /CaseSensitive/Run?token=AbC123&Mode=Keep
  • https://diffsite.com/Test/Path?Token=AbC123

Both should be forwarded exactly as supplied in the raw HTTP request.

Testing

  • .venv/bin/pytest tests/unit/target/test_http_target.py -q
  • .venv/bin/pytest tests/unit/target/test_http_target_parsing.py -q

@romanlutz romanlutz merged commit 52f8b2f into Azure:main Mar 17, 2026
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants