[
https://issues.apache.org/jira/browse/THRIFT-2998?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14320328#comment-14320328
]
ASF GitHub Bot commented on THRIFT-2998:
----------------------------------------
GitHub user tstanev opened a pull request:
https://github.com/apache/thrift/pull/378
Set Content-Type for HTTP request in Node.js wrapper. Done similar to th...
...e Python wrapper here:
https://github.com/apache/thrift/blob/master/lib/py/src/transport/THttpClient.py#L127
Without this header, connecting to some servers results in error response.
(THRIFT-2998)
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/tstanev/thrift adsk/nodejs_header
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/thrift/pull/378.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 #378
----
commit 0056ba8e1093b4bdde504d4f7bedc4874756f931
Author: stanevt <[email protected]>
Date: 2015-02-13T15:45:59Z
Set Content-Type for HTTP request in Node.js wrapper. Done similar to the
Python wrapper here
https://github.com/apache/thrift/blob/master/lib/py/src/transport/THttpClient.py#L127
.
----
> Node.js: Missing header from http request
> -----------------------------------------
>
> Key: THRIFT-2998
> URL: https://issues.apache.org/jira/browse/THRIFT-2998
> Project: Thrift
> Issue Type: Bug
> Components: Node.js - Library
> Affects Versions: 0.9.2
> Reporter: Traian Stanev
>
> The "Content-Type" header is not being set to "application/x-thrift" when
> making http requests in the node.js implementation. This results in error
> response (status 400) for any such connections (depending on whether the
> server checks the header). The Python implementation for example adds the
> header explicitly:
> https://github.com/tstanev/thrift/blob/master/lib/py/src/transport/THttpClient.py#L127
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)