mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00: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.
20 lines
587 B
HTML
20 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>
|