[
https://issues.apache.org/jira/browse/THRIFT-2998?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14571333#comment-14571333
]
ASF GitHub Bot commented on THRIFT-2998:
----------------------------------------
Github user tstanev commented on the pull request:
https://github.com/apache/thrift/pull/378#issuecomment-108526460
I am only porting the fix from the python wrapper in order to make the node
wrapper actually work. I don't know enough about Thrift to have a thought about
what it should or should not do instead, but I am certain that with the server
I attempted to use this with, only the application/x-thrift header worked. The
IANA header did not work, so using the IANA header will not work in my case.
> 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)