Skip to content

fix: redirect is checked on native handler#181

Open
g105b wants to merge 1 commit into
masterfrom
180-redirect-curlhandle
Open

fix: redirect is checked on native handler#181
g105b wants to merge 1 commit into
masterfrom
180-redirect-curlhandle

Conversation

@g105b
Copy link
Copy Markdown
Member

@g105b g105b commented May 29, 2026

This fix is to stop asking the callback argument for redirect configuration and instead use the redirect limit already known when the request is created.

RequestResolver now stores the configured CURLOPT_MAXREDIRS value alongside the rest of the request state and checks that stored value when it sees a Location header.

That removes the dependency on whether the callback received a wrapper object or a native handle.

The test coverage was updated to prove the native-handle case explicitly using NativeHandleTestCurl, which restores the production meaning of getHandle() for that test path while keeping the rest of the simulator behaviour unchanged.

closes #180

@codacy-production
Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

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.

RequestResolver: redirect handling CURLOPT_MAXREDIRS change in PHP 8.5

1 participant