Skip to content

[1.7] Fix extra http headers #413

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

enricodias
Copy link
Member

The correct syntax is ['headers' => $headers].
Network.setHTTPHeaders must be sent per page instance, after Network.enable.

Page::setExtraHTTPHeaders will now throw an exception if the response contains an error. The tests were modified to actually try to send the headers to chrome, to make them fail if we get an exception.

Fixes #404

@enricodias enricodias force-pushed the fix-header-syntax-in-setExtraHTTPHeaders branch from a4fc67c to 9f490d3 Compare August 23, 2022 02:34
Ensures that  `setExtraHTTPHeaders` is called after `Network.enable`.
Adjust tests to actually try to send the headers to chrome.
@enricodias enricodias force-pushed the fix-header-syntax-in-setExtraHTTPHeaders branch from 9f490d3 to 0547470 Compare August 23, 2022 02:47
@enricodias enricodias linked an issue Aug 23, 2022 that may be closed by this pull request

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@GrahamCampbell GrahamCampbell changed the title Fix extra http headers [1.7] Fix extra http headers Aug 28, 2022
@GrahamCampbell GrahamCampbell merged commit 82f5ab2 into chrome-php:1.7 Aug 28, 2022
@enricodias enricodias deleted the fix-header-syntax-in-setExtraHTTPHeaders branch August 31, 2022 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Not working custom headers
2 participants