mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-16 07:20:46 +00:00
LibWeb: Allow null for optional, nullable, no default value union types
For these types, it would previously only accept `undefined` for the `null` state. Fixes GET requests in the Turbo library always failing:9e057f284a/src/http/fetch_request.js (L219-L220)
9e057f284a/src/http/fetch_request.js (L51-L64)
This was found on https://www.fangamer.com/.
This commit is contained in:
parent
16662ab230
commit
198cec481a
Notes:
github-actions[bot]
2025-02-22 17:46:21 +00:00
Author: https://github.com/Lubrsi
Commit: 198cec481a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3659
3 changed files with 27 additions and 1 deletions
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<script src="../include.js"></script>
|
||||
<script>
|
||||
asyncTest(async (done) => {
|
||||
try {
|
||||
const dataUrl = "data:,hello";
|
||||
new Request(dataUrl, { method: "GET", body: null });
|
||||
println("Successfully created GET request with body set to null");
|
||||
new Request(dataUrl, { method: "HEAD", body: null });
|
||||
println("Successfully created HEAD request with body set to null");
|
||||
await fetch(dataUrl, { method: "GET", body: null });
|
||||
println("Successfully started GET fetch with body set to null");
|
||||
await fetch(dataUrl, { method: "HEAD", body: null });
|
||||
println("Successfully started HEAD fetch with body set to null");
|
||||
} catch (e) {
|
||||
println(`Unexpected throw: ${e}`);
|
||||
}
|
||||
|
||||
done();
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue