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

Properly sequence response logic for HTML5 XMLHttpResponse to avoid races #4197

Merged
merged 3 commits into from
Jul 5, 2023

Conversation

kwvanderlinde
Copy link
Collaborator

@kwvanderlinde kwvanderlinde commented Jul 4, 2023

Identify the Bug or Feature request

Fixes #4179

Description of the Change

Alongisde some cleanup, this changes the return of RequestHandler.processRequest() for macro:// URIs so that the returned future is not completed until the response headers are read back from the macro variables. This avoids an accidental race between the RequestHandler.processRequest() logic and the logic in MTXMLHttpRequest.send() that pulls the status code from the headers. There is also a small change to handle the edge case that no status line is set when reading statusText.

Possible Drawbacks

Should be none.

Documentation Notes

N/A

Release Notes

  • Fixed a rare ConcurrentModificationException in the HTML5 fetch API

This change is Reviewable

- Remove unused imports
- Make it clear what is initialized during construction and what is set later
@kwvanderlinde kwvanderlinde changed the title Bugfix/4179 cme fetch api Properly sequence response logic for HTML5 XMLHttpResponse to avoid races Jul 5, 2023
@cwisniew cwisniew added this pull request to the merge queue Jul 5, 2023
Merged via the queue into RPTools:develop with commit 7749378 Jul 5, 2023
@cwisniew cwisniew added the bug label Aug 2, 2023
@kwvanderlinde kwvanderlinde deleted the bugfix/4179-cme-fetch-api branch August 31, 2023 02:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

[Bug]: CME with fetch API
2 participants