Skip to content

Added conditional support in xhr#2645

Closed
nithinkdb wants to merge 3 commits into
apache:masterfrom
nithinkdb:xhr-binary
Closed

Added conditional support in xhr#2645
nithinkdb wants to merge 3 commits into
apache:masterfrom
nithinkdb:xhr-binary

Conversation

@nithinkdb

@nithinkdb nithinkdb commented Aug 22, 2022

Copy link
Copy Markdown

This is a continuation of a pull request that was created a while ago. I've replicated the changes, and added an additional check that keeps functionality largely the same while enabling TBinaryProtocol to be used in XHRRequests. This is needed for functionality in one of our thrift projects.
Link to original PR:
#2157

  • Did you create an Apache Jira ticket? (not required for trivial changes)
  • If a ticket exists: Does your pull request title follow the pattern "THRIFT-NNNN: describe my issue"?
  • Did you squash your changes to a single commit? (not required, but preferred)
  • 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.


var xreq = this.getXmlHttpRequestObject();

if (this.protocol == TBinaryProtocol) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which binary protocol is this referring to?
databricks thrift uses Http Thrift protocol not Binary thrift protocol. Is this referring to the same conectp?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ya, each connection within thrift has an associated protocol for encoding as well as a transport type. We use an HTTP connection within the nodeconnector, and we encode that information with a binary protocol and send it in chunks (bufffered transport).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the sake of terminology: HTTP is a transport which can of course be combined with a binary protocol.

@nithinkdb

Copy link
Copy Markdown
Author

Hi, any updates on this? Has anyone from the Apache Thrift team taken a look?

@nithinkdb nithinkdb requested a review from Jens-G October 12, 2022 19:25
@Jens-G Jens-G added the javascript Pull requests that update Javascript code label Oct 25, 2022
@Jens-G Jens-G added the rebase needed rebase needed label May 14, 2025
@Jens-G

Jens-G commented Nov 20, 2025

Copy link
Copy Markdown
Member

rebase needed, no activity since 2022

@Jens-G Jens-G closed this Nov 20, 2025
CJCombrink added a commit to CJCombrink/thrift that referenced this pull request Mar 12, 2026
- Picking up THRIFT-4987 based on feedback and other PRs and local thrift patches for npm package
- Changes most probably originated from apache#2645 and apache#2157 that went stale and PRs were closed
CJCombrink added a commit to CJCombrink/thrift that referenced this pull request Mar 13, 2026
- Picking up THRIFT-4987 based on feedback and other PRs and local thrift patches for npm package
- Changes most probably originated from apache#2645 and apache#2157 that went stale and PRs were closed
CJCombrink added a commit to CJCombrink/thrift that referenced this pull request Mar 17, 2026
- Picking up THRIFT-4987 based on feedback and other PRs and local thrift patches for npm package
- Changes most probably originated from apache#2645 and apache#2157 that went stale and PRs were closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

javascript Pull requests that update Javascript code rebase needed rebase needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants