Skip to content

Commit

Permalink
chore: update WPT (#3519)
Browse files Browse the repository at this point in the history
Co-authored-by: Uzlopak <5059100+Uzlopak@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and Uzlopak authored Aug 28, 2024
1 parent e6a466f commit 8f950c4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions test/fixtures/wpt/xhr/request-content-length.any.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ async_test(test => {
assert_true(happened);
assert_true(client.responseText.includes(`Content-Length: ${data.length}`));
});
client.onerror = test.unreached_func();
client.open("POST", "resources/echo-headers.py");
client.send(data);
}, "Uploads need to set the Content-Length header");
Expand Down
4 changes: 3 additions & 1 deletion test/fixtures/wpt/xhr/resources/echo-headers.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
def main(request, response):
content = str(request.raw_headers)
response.writer.write_status(200)
response.writer.write_header(b"Content-Type", b"text/plain")
response.writer.write_header(b"Content-Length", str(len(content)))
response.writer.write_header(b"Connection", b"close")
response.writer.end_headers()
response.writer.write(str(request.raw_headers))
response.writer.write(content)
response.close_connection = True

0 comments on commit 8f950c4

Please # to comment.