You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by cameronr <gi...@git.apache.org> on 2014/11/02 10:36:22 UTC
[GitHub] thrift pull request: add support for running under Browserify
GitHub user cameronr opened a pull request:
https://github.com/apache/thrift/pull/251
add support for running under Browserify
Add option for setting the desired XHR responseType.
When running the http client under Browserify, the data provided in the callback will be a string or a Uint8Array ArrayBuffer. Wrap both of those in a Buffer so ``data[i].copy`` can succeed.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/cameronr/thrift master
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/thrift/pull/251.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #251
----
commit 5b87cea8b385ed20426b519c6b98c2c0ca38a57d
Author: Cameron Ring <ca...@cs.stanford.edu>
Date: 2014-11-02T09:17:49Z
Add support for Browserify
When running under Browserify, response.on('data') may be called with a
string or an array buffer (not just with a Buffer). Wrap those types in
a buffer so that response.on('end') is able to process the data
correctly.
commit 02cca3ce903f4ab7012e4aa67a11264d542f5790
Author: Cameron Ring <ca...@cs.stanford.edu>
Date: 2014-11-02T09:25:38Z
Add support for setting responseType
It's convenient to be able to set the expected response type for the
XHR, particularly when receiving binary data.
commit 079a1f44179655331743b96f5f8b3f42f0801365
Author: Cameron Ring <ca...@cs.stanford.edu>
Date: 2014-11-02T09:32:41Z
update comment about Browserify and types
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] thrift pull request: THRIFT-2844: Nodejs support broken when runni...
Posted by cameronr <gi...@git.apache.org>.
Github user cameronr commented on the pull request:
https://github.com/apache/thrift/pull/251#issuecomment-65335108
oh, i'm stupid :)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] thrift pull request: THRIFT-2844: Nodejs support broken when runni...
Posted by cvlchinet <gi...@git.apache.org>.
Github user cvlchinet commented on the pull request:
https://github.com/apache/thrift/pull/251#issuecomment-65298557
Usually you should be the one, with closing rights.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] thrift pull request: add support for running under Browserify
Posted by cvlchinet <gi...@git.apache.org>.
Github user cvlchinet commented on the pull request:
https://github.com/apache/thrift/pull/251#issuecomment-63556192
Did you double check that data really comes as an Uint8Array and not a plain ArrayBuffer?
And to get more attention and to follow their contribution rules, you should file an issue in JIRA:
https://issues.apache.org/jira/browse/THRIFT/
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] thrift pull request: THRIFT-2844: Nodejs support broken when runni...
Posted by cameronr <gi...@git.apache.org>.
Github user cameronr commented on the pull request:
https://github.com/apache/thrift/pull/251#issuecomment-64324675
ah crap, messed up while updating to the recent changes. will close this PR and open a new one with the appropriate changes
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] thrift pull request: THRIFT-2844: Nodejs support broken when runni...
Posted by cameronr <gi...@git.apache.org>.
Github user cameronr closed the pull request at:
https://github.com/apache/thrift/pull/251
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] thrift pull request: THRIFT-2844: Nodejs support broken when runni...
Posted by cameronr <gi...@git.apache.org>.
Github user cameronr commented on the pull request:
https://github.com/apache/thrift/pull/251#issuecomment-63778908
jira issue created.
yes, Browserify returns Uint8arrays, not a generic ArrayBuffer. you can see the code here:
https://github.com/substack/http-browserify/blob/master/lib/response.js#L108
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] thrift pull request: THRIFT-2844: Nodejs support broken when runni...
Posted by cvlchinet <gi...@git.apache.org>.
Github user cvlchinet commented on the pull request:
https://github.com/apache/thrift/pull/251#issuecomment-63784793
Ok thanks for clarifying :-)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---