Skip to content

fix(route): allow allHeaders call within route#9300

Merged
pavelfeldman merged 1 commit into
microsoft:masterfrom
pavelfeldman:route_headers
Oct 4, 2021
Merged

fix(route): allow allHeaders call within route#9300
pavelfeldman merged 1 commit into
microsoft:masterfrom
pavelfeldman:route_headers

Conversation

@pavelfeldman
Copy link
Copy Markdown
Member

@pavelfeldman pavelfeldman commented Oct 4, 2021

Fixes #9298

Comment thread src/server/chromium/crNetworkManager.ts Outdated
it('should contain raw header', async ({ page, server }) => {
let headers: any;
await page.route('**/*', async route => {
headers = await route.request().allHeaders();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Check that it actually returns expected headers?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I don't think we are returning raw headers here, so I only check that it accept one exists.

Comment thread src/server/network.ts
this._rawRequestHeadersPromise!.resolve(headers);
}

async rawRequestHeaders(): Promise<NameValue[]> {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please add a comment explaining 3 ways the raw headers could be received

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Which 3 ways? :)

@pavelfeldman pavelfeldman added CQ1 and removed CQ1 labels Oct 4, 2021
@pavelfeldman pavelfeldman merged commit 6e803f7 into microsoft:master Oct 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Question]: Should new Headers methods work in RouteAsync ?

2 participants