Skip to content
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

fix(ext/fetch): avoid panic when header is invalid #12244

Merged
merged 3 commits into from
Sep 29, 2021

Conversation

ahabhgk
Copy link
Contributor

@ahabhgk ahabhgk commented Sep 27, 2021

fix #12236

@CLAassistant
Copy link

CLAassistant commented Sep 27, 2021

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@lucacasonato lucacasonato left a comment

Choose a reason for hiding this comment

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

Can you add a test for this?

Copy link
Member

@lucacasonato lucacasonato left a comment

Choose a reason for hiding this comment

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

This looks fantastic. Great test :-)

While you are at it, can you also remove the .unwrap from HeaderName::from_bytes, and add a test for that? Alternatively we can do that in a follow-up PR, and I'll merge this one. Let me know what works better for you!

@ahabhgk
Copy link
Contributor Author

ahabhgk commented Sep 29, 2021

This looks fantastic. Great test :-)

While you are at it, can you also remove the .unwrap from HeaderName::from_bytes, and add a test for that? Alternatively we can do that in a follow-up PR, and I'll merge this one. Let me know what works better for you!

Of course I can, let me remove the .unwrap from HeaderName::from_bytes and add a test for it.

Copy link
Member

@lucacasonato lucacasonato left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks @ahabhgk!

cli/tests/unit/fetch_test.ts Show resolved Hide resolved
@ahabhgk
Copy link
Contributor Author

ahabhgk commented Sep 29, 2021

I updated the wpt result, now the workflow should pass.

@lucacasonato lucacasonato merged commit 923d9c7 into denoland:main Sep 29, 2021
@ahabhgk ahabhgk deleted the fix-fetch-panic branch September 29, 2021 16:44
crowlKats added a commit to crowlKats/deno that referenced this pull request Jan 5, 2022
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.

Panic in ext/fetch during WPT
3 participants