mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
Fixes a regression from commit:
f675cfe90f
It is not sufficient to only check if the builder is empty, as we will
then drop empty header values (when the first found value is empty).
This is tested in WPT by /cors/origin.htm, but that requires an HTTP
server.
21 lines
587 B
HTML
21 lines
587 B
HTML
<!doctype html>
|
|
<script src="../include.js"></script>
|
|
<script type="text/javascript">
|
|
test(() => {
|
|
{
|
|
let headers = new Headers({ "X-Foo": "" });
|
|
println(`X-Foo: "${headers.get("X-Foo")}"`);
|
|
|
|
headers.append("X-Foo", "a");
|
|
println(`X-Foo: "${headers.get("X-Foo")}"`);
|
|
}
|
|
{
|
|
let headers = new Headers({ "X-Foo": "a" });
|
|
println(`X-Foo: "${headers.get("X-Foo")}"`);
|
|
|
|
headers.append("X-Foo", "");
|
|
println(`X-Foo: "${headers.get("X-Foo")}"`);
|
|
}
|
|
});
|
|
</script>
|