Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

HTTPRequest fails HEAD mode requests in Chrome 113 #76825

Open
Isaaaca opened this issue May 8, 2023 · 3 comments
Open

HTTPRequest fails HEAD mode requests in Chrome 113 #76825

Isaaaca opened this issue May 8, 2023 · 3 comments

Comments

@Isaaaca
Copy link

Isaaaca commented May 8, 2023

Godot version

v3.5.2.stable.official [170ba33]

System information

Chrome Version 113.0.5672.64 (Official Build) (64-bit), Microsoft Edge Version 113.0.1774.35 (Official build) (64-bit)

Issue description

After Chromium 113, http requests with the HEAD method returns a response with an null body. This results in a TypeError in html5 exports, which causes HTTPRequest nodes to return a RESULT_CONNECTION_ERROR with a response code of 0. So far this affects all Chromium browsers, Firefox and Safari have not been affected (based on my limited testing). I suspect the problem to affect the HTTPClient node as well, but I have not tested that yet.

TypeError and Variables returned from 'request_completed' signal
image

Response object with body being null in Chrome 113
image
Response object in Firefox and older Chromium Browsers
image

I believe the js error is caused by this bit of code in the .js export:
image

But re-writing that bit so that obj.reader is null, undefined or new ReadableStream().getReader() only suppresses the error and does not solve the problem.

Steps to reproduce

  1. Create a HTTPRequest node
  2. Make a (valid) request with the HEAD method.
  3. Export the project to HTML5
  4. Run the project in any Chromium browser based on Chromium 113

Minimal reproduction project

HTTPRequestMRP.zip

@Calinou
Copy link
Member

Calinou commented May 8, 2023

Can you reproduce this in Chromium 112 or older?

@jmwielandt
Copy link

@Calinou maybe you wanna see this issue microsoft/typed-rest-client#355

@Isaaaca
Copy link
Author

Isaaaca commented May 9, 2023

Can you reproduce this in Chromium 112 or older?

No, it only occurs in Chromium 113.0.5672.64. Our project started having problems since last week's (2 May) update to the version.
https://chromereleases.googleblog.com/2023/05/stable-channel-update-for-desktop.html

Good news is, it seems this has been just been reverted.
https://chromereleases.googleblog.com/2023/05/stable-channel-update-for-desktop_8.html
image
from: https://chromium.googlesource.com/chromium/src/+log/113.0.5672.63..113.0.5672.92?pretty=fuller&n=10000

However, it might still be worth fixing since having a response with a null body does comply to standard.
image
https://fetch.spec.whatwg.org/#responses

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants