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

Fix writing property on browsers #789

Merged
merged 5 commits into from
Jun 30, 2022
Merged

Conversation

relu91
Copy link
Member

@relu91 relu91 commented Jun 29, 2022

This PR focuses on the resolution of issue #785. Due to whatwg/fetch#1438 we can't use streams when writing property or invoking an action. Therefore, these changes introduce a specific HttpClient for browsers that override the generateFetchRequest method to read the stream in a buffer.

Moreover, the PR fixes smaller issues:

  • The HTTP server correctly answers CORS requests for PUT methods in the properties path
  • When a Readable is forcibly closed the underlying Readable is correctly closed and the error is propagated.
  • Readable.from is not available in readable-stream v3.x.x so now we are forcing browserify to use the new v4.x.x. That's why in the PR you can see a new build.js script. Its purpose is to properly set up browserify. I couldn't find a way to achieve the same effect using just CLI arguments.

@relu91
Copy link
Member Author

relu91 commented Jun 30, 2022

Being just a bug fix I'd go ahead and merge it.

@relu91 relu91 merged commit fda5ae4 into eclipse-thingweb:master Jun 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant