LibWeb: Add test for non-ascii content-type headers

This couldn't be added in #1893
This commit is contained in:
Gingeh 2024-12-06 14:12:30 +11:00 committed by Tim Ledbetter
parent ebc91686b5
commit e4512d8089
Notes: github-actions[bot] 2024-12-06 04:49:29 +00:00
2 changed files with 23 additions and 0 deletions

View file

@ -0,0 +1 @@
PASS (didn't crash)

View 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>