urlapi: handle redirect without set scheme with default-scheme#21632
urlapi: handle redirect without set scheme with default-scheme#21632bagder wants to merge 1 commit into
Conversation
|
Analysis of PR #21632 at a6650300: Test 2402 failed, which has NOT been flaky recently, so there could be a real issue in this PR. Note that this test has failed in 12 different CI jobs (the link just goes to one of them). Note that this CI job has had a number of other flaky tests recently (2, to be exact) so it may be that this failure is rather a systemic issue with this job and not with this specific PR. Generated by Testclutch |
There was a problem hiding this comment.
Pull request overview
This PR updates URL API redirect handling so a relative redirect can be applied when the URL handle has no stored scheme but CURLU_DEFAULT_SCHEME is in use.
Changes:
- Falls back to
DEFAULT_SCHEMEwhen computing redirect URL offsets ifu->schemeis unset. - Adds a new libtest regression case for default-scheme redirects.
- Registers the new test source and test data.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
lib/urlapi.c |
Uses the default scheme when deriving the protocol separator during relative redirect handling. |
tests/libtest/lib1921.c |
Adds a regression test for redirecting a URL handle without a stored scheme. |
tests/libtest/Makefile.inc |
Adds lib1921.c to the libtest build list. |
tests/data/test1921 |
Defines the new URL API regression test. |
tests/data/Makefile.am |
Adds test1921 to the test data list. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
99c399c to
94dda7f
Compare
Reported-by: mulan_dh on hackerone Closes #21632
94dda7f to
565e2e1
Compare
Reported-by: mulan_dh on hackerone Closes #21632
565e2e1 to
a023bdc
Compare
Verify in test 1921 Reported-by: mulan_dh on hackerone Closes curl#21632
Reported-by: mulan_dh on hackerone