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

Empty HTTP responses cause async_load.status to be -1 #8464

Closed
2 tasks done
peardox opened this issue Nov 20, 2024 · 2 comments
Closed
2 tasks done

Empty HTTP responses cause async_load.status to be -1 #8464

peardox opened this issue Nov 20, 2024 · 2 comments
Assignees
Labels
gmrt-bug In-game bugs with the "GMRT" runtimes

Comments

@peardox
Copy link

peardox commented Nov 20, 2024

Description

The GML websocket stuff isn't compatible with socket.io so started writing my own...

TRhe first thing you have to do when creating a web socket is to upgrade the request (see the Async - HTTP) which is then sent back to the server f0or upgrading (this could fail - in which case polling would be used)

When the response comes back from socket.io the HTTP Status will be 101 - Switching Protocols

GML treats this as a bad request with status set to -1 even though the request was perfectly fine. The only option here is to completely ignore status and use the http_status then if it's 101 proceed

I suspect that other http_status codes that are prefectly fine also are treated as bad by status

OK, status may be for the idiots but in the case of something like http_request or the other more advanced functions isn't it fair to expect the dev knows what a bad http really looks like?

com.peardox.wsock.zip

Expected Change

http status 101 should not make status -1

Steps To Reproduce

  1. Start GameMaker
  2. Import Project
  3. Note - there is a socket.io server running on the suppied URL - just a dumb echo
  4. See the issue

How reliably can you recreate this issue using your steps above?

Always

Which version of GMRT are you reporting this issue for?

2024.8.1.171

Contact Us Package Attached?

  • I have attached my Contact Us Package

Sample Project Added?

  • I have included a small sample project
@peardox peardox added the gmrt-bug In-game bugs with the "GMRT" runtimes label Nov 20, 2024
@stuckie stuckie moved this from Triage to Backlog in Team Workload Nov 20, 2024
@yoyo-danielc yoyo-danielc changed the title HTTP Status 101 is not an error Empty HTTP responses cause async_load.status to be -1 Nov 20, 2024
@yoyo-danielc
Copy link

This was recently fixed in GMS2 (#7811), will be fixed in the next GMRT release.

@github-project-automation github-project-automation bot moved this from Backlog to Done in Team Workload Nov 20, 2024
@peardox
Copy link
Author

peardox commented Nov 20, 2024

Cool - thx

@YYBartT YYBartT moved this from Done to Ready for QA in Team Workload Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gmrt-bug In-game bugs with the "GMRT" runtimes
Projects
Status: Ready for QA
Development

No branches or pull requests

2 participants