mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-22 17:24:48 -05:00
LibWeb: Add test for non-ascii content-type headers
This couldn't be added in #1893
This commit is contained in:
parent
ebc91686b5
commit
e4512d8089
Notes:
github-actions[bot]
2024-12-06 04:49:29 +00:00
Author: https://github.com/Gingeh Commit: https://github.com/LadybirdBrowser/ladybird/commit/e4512d8089e Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2805 Reviewed-by: https://github.com/tcl3 ✅
2 changed files with 23 additions and 0 deletions
|
@ -0,0 +1 @@
|
|||
PASS (didn't crash)
|
22
Tests/LibWeb/Text/input/http-non-ascii-content-type.html
Normal file
22
Tests/LibWeb/Text/input/http-non-ascii-content-type.html
Normal file
|
@ -0,0 +1,22 @@
|
|||
<!DOCTYPE html>
|
||||
<script src="include.js"></script>
|
||||
<script>
|
||||
asyncTest(async (done) => {
|
||||
try {
|
||||
const httpServer = httpTestServer();
|
||||
const url = await httpServer.createEcho("GET", "/http-non-ascii-content-type-test", {
|
||||
status: 200,
|
||||
headers: {
|
||||
"Access-Control-Allow-Origin": "*",
|
||||
"Content-Type": "text/html;test=ÿ;charset=gbk",
|
||||
},
|
||||
});
|
||||
|
||||
const blob = await fetch(url).then((response) => response.blob());
|
||||
println("PASS (didn't crash)");
|
||||
} catch (err) {
|
||||
println("FAIL - " + err);
|
||||
}
|
||||
done();
|
||||
});
|
||||
</script>
|
Loading…
Reference in a new issue