Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Update WPT #3519

Merged
merged 1 commit into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading