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

LibWeb: Ensure Headers API can handle non-ascii characters #2814

Merged
merged 1 commit into from
Dec 11, 2024

Conversation

F3n67u
Copy link
Contributor

@F3n67u F3n67u commented Dec 6, 2024

Ensure the Headers object's associated header list is ISO-8859-1 encoded
when set using Infra::isomorphic_encode and correctly decoded using
Infra::isomorphic_decode.

Follow-up of #1893

@F3n67u F3n67u changed the title LibWeb: Fix crash in Headers::get when handling values containing -ASCII Latin1 characters LibWeb: Fix crash in Headers::get when handling values containing non-ASCII Latin1 characters Dec 6, 2024
@F3n67u F3n67u force-pushed the fetch-headers-get-nonascii branch from 7988bea to 3ec3685 Compare December 6, 2024 17:43
@F3n67u F3n67u changed the title LibWeb: Fix crash in Headers::get when handling values containing non-ASCII Latin1 characters LibWeb: Fix crash in Headers::get when handling non-ASCII Latin1 characters Dec 6, 2024
@F3n67u F3n67u force-pushed the fetch-headers-get-nonascii branch from 3ec3685 to ad397ab Compare December 6, 2024 17:44
@F3n67u F3n67u changed the title LibWeb: Fix crash in Headers::get when handling non-ASCII Latin1 characters LibWeb: Fix crash in Headers::get when handling non-ASCII characters Dec 6, 2024
@F3n67u F3n67u force-pushed the fetch-headers-get-nonascii branch 4 times, most recently from 0b18dd5 to ddd04de Compare December 7, 2024 02:26
@F3n67u F3n67u changed the title LibWeb: Fix crash in Headers::get when handling non-ASCII characters LibWeb: Ensure Headers API can handle non-ascii characters Dec 7, 2024
@F3n67u F3n67u force-pushed the fetch-headers-get-nonascii branch 2 times, most recently from 1bb9e88 to dc24a87 Compare December 7, 2024 02:30
@F3n67u F3n67u marked this pull request as ready for review December 7, 2024 03:29
@shlyakpavel
Copy link
Contributor

shlyakpavel commented Dec 9, 2024

This fixes crash in WPT: https://wpt.fyi/results/fetch/api/headers/headers-normalize.any.html
Can we import it as well?

This patch ensure Headers object's associated header list
is ISO-8859-1 encoded when set using `Infra::isomorphic_encode`,
and correctly decoded using `Infra::isomorphic_decode`.

Follow-up of LadybirdBrowser#1893
@F3n67u F3n67u force-pushed the fetch-headers-get-nonascii branch from dc24a87 to 45a3b61 Compare December 9, 2024 22:04
@F3n67u
Copy link
Contributor Author

F3n67u commented Dec 9, 2024

This fixes crash in WPT: https://wpt.fyi/results/fetch/api/headers/headers-normalize.any.html Can we import it as well?

Imported, Thank you!

@F3n67u
Copy link
Contributor Author

F3n67u commented Dec 11, 2024

Hi, @Gingeh, could you please review this PR when you have a moment? It address part of issues I mention in #1893. Thanks!

Copy link
Contributor

@Gingeh Gingeh left a comment

Choose a reason for hiding this comment

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

This all looks good to me 👍

@ADKaster ADKaster merged commit 824e91f into LadybirdBrowser:master Dec 11, 2024
6 checks passed
@F3n67u F3n67u deleted the fetch-headers-get-nonascii branch December 14, 2024 02:23
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.

4 participants