MAXruppert opened a new pull request #2157: URL: https://github.com/apache/thrift/pull/2157
Client: nodejs The XHRClient uses the XMLHttpRequest web api to do requests. To correctly interpret binary data, the `responseType` needs to be set to `arraybuffer`, and the `response` property should be used instead of `responseText` (`response` defaults to normal text when not specified). See [here](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Using_XMLHttpRequest). I'd like to add tests but am unsure what the best practice would be for this with regards to the project testing framework? It would involve bundling the `nodejs` lib into a browser for testing, or perhaps running a headless browser environment in nodejs? I'd be happy to add tests, but would greatly appreciate if someone could point me in the correct direction. I'm succesfully using this fix with a C++ HTTP server using the binary protocol for my use case. --- - [ ] Did you create an [Apache Jira](https://issues.apache.org/jira/projects/THRIFT/issues/) ticket? (not required for trivial changes) - [x] If a ticket exists: Does your pull request title follow the pattern "THRIFT-NNNN: describe my issue"? - [x] Did you squash your changes to a single commit? (not required, but preferred) - [x] Did you do your best to avoid breaking changes? If one was needed, did you label the Jira ticket with "Breaking-Change"? - [ ] If your change does not involve any code, include `[skip ci]` anywhere in the commit message to free up build resources. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org