[jira] [Commented] (THRIFT-2998) Node.js: Missing header from http request
[ https://issues.apache.org/jira/browse/THRIFT-2998?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16223782#comment-16223782 ] ASF GitHub Bot commented on THRIFT-2998: Github user asfgit closed the pull request at: https://github.com/apache/thrift/pull/1403 > 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 >Assignee: James E. King, III >Priority: Minor > > 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.4.14#64029)
[jira] [Commented] (THRIFT-2998) Node.js: Missing header from http request
[ https://issues.apache.org/jira/browse/THRIFT-2998?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16223783#comment-16223783 ] ASF GitHub Bot commented on THRIFT-2998: Github user asfgit closed the pull request at: https://github.com/apache/thrift/pull/378 > 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 >Assignee: James E. King, III >Priority: Minor > > 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.4.14#64029)
[jira] [Commented] (THRIFT-2998) Node.js: Missing header from http request
[ https://issues.apache.org/jira/browse/THRIFT-2998?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16223565#comment-16223565 ] ASF GitHub Bot commented on THRIFT-2998: GitHub user jeking3 opened a pull request: https://github.com/apache/thrift/pull/1403 THRIFT-2998, combined #378 with enabling nodejs in make cross Yes, one little dlang warning fix slipped in there too. :) You can merge this pull request into a Git repository by running: $ git pull https://github.com/jeking3/thrift test-THRIFT-2998 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/thrift/pull/1403.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 #1403 commit 016aa97737c8cbeed2eb3312481d7c90953a4f15 Author: stanevtDate: 2015-02-13T15:45:59Z THRIFT-2998: Set Content-Type for HTTP request in Node.js wrapper. Client: nodejs This closes #378 commit 807396ea90e0c05dcbca568f3fe45e2af9cf5e61 Author: James E. King, III Date: 2017-10-26T04:09:34Z THRIFT-2998: enable cross test for nodejs http transport, fix missing apache license headers in nodejs Client: nodejs > 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 >Assignee: James E. King, III >Priority: Minor > > 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.4.14#64029)
[jira] [Commented] (THRIFT-2998) Node.js: Missing header from http request
[ https://issues.apache.org/jira/browse/THRIFT-2998?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16220634#comment-16220634 ] James E. King, III commented on THRIFT-2998: While this change looks good, when I enable cross testing of nodejs and http transport, some things pass and some do not. Too many do not... *grumble* > 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 >Assignee: James E. King, III >Priority: Minor > > 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.4.14#64029)
[jira] [Commented] (THRIFT-2998) Node.js: Missing header from http request
[ https://issues.apache.org/jira/browse/THRIFT-2998?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16219950#comment-16219950 ] James E. King, III commented on THRIFT-2998: I'm going to submit a 2nd pull request with this fix plus the cross test enablement and some licensing header fixups for nodejs. > 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 >Assignee: James E. King, III >Priority: Minor > > 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.4.14#64029)
[jira] [Commented] (THRIFT-2998) Node.js: Missing header from http request
[ https://issues.apache.org/jira/browse/THRIFT-2998?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16219510#comment-16219510 ] ASF GitHub Bot commented on THRIFT-2998: Github user jeking3 commented on the issue: https://github.com/apache/thrift/pull/378 To properly test this fix I need to add http transport support to the nodejs cross programs, so I'll do that as part of the effort. > 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.4.14#64029)
[jira] [Commented] (THRIFT-2998) Node.js: Missing header from http request
[ https://issues.apache.org/jira/browse/THRIFT-2998?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16219234#comment-16219234 ] ASF GitHub Bot commented on THRIFT-2998: Github user jeking3 commented on the issue: https://github.com/apache/thrift/pull/378 @tstanev Thank you for putting in the time. The PR backlog on the project is getting better - there were over 100 PRs at the beginning of the year and we're down to 50, so every little bit helps. Of course today of all days Travis CI is having some pretty nasty issues with Docker Hub. :) > 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.4.14#64029)
[jira] [Commented] (THRIFT-2998) Node.js: Missing header from http request
[ https://issues.apache.org/jira/browse/THRIFT-2998?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16219213#comment-16219213 ] ASF GitHub Bot commented on THRIFT-2998: Github user tstanev commented on the issue: https://github.com/apache/thrift/pull/378 By the way -- it's been nearly three years and I have since switched to another way of doing things. You can close the PR if nobody else needs it. > 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.4.14#64029)
[jira] [Commented] (THRIFT-2998) Node.js: Missing header from http request
[ https://issues.apache.org/jira/browse/THRIFT-2998?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16219207#comment-16219207 ] ASF GitHub Bot commented on THRIFT-2998: Github user tstanev commented on the issue: https://github.com/apache/thrift/pull/378 It's rebased now. > 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.4.14#64029)
[jira] [Commented] (THRIFT-2998) Node.js: Missing header from http request
[ https://issues.apache.org/jira/browse/THRIFT-2998?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15158185#comment-15158185 ] ASF GitHub Bot commented on THRIFT-2998: Github user jfarrell commented on the pull request: https://github.com/apache/thrift/pull/378#issuecomment-187493321 @RandyAbernethy agree with your suggested approach of committing this and creating a backlog story to tackle the larger IANA registered media type as a follow up > 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)
[jira] [Commented] (THRIFT-2998) Node.js: Missing header from http request
[ https://issues.apache.org/jira/browse/THRIFT-2998?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14571011#comment-14571011 ] ASF GitHub Bot commented on THRIFT-2998: Github user stigsb commented on the pull request: https://github.com/apache/thrift/pull/378#issuecomment-108482745 IMHO client code should always send the IANA-registered types, while servers should accept `application/x-thrift` as an alias for `application/vnd.apache.thrift.binary` (probably for a long time). 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)
[jira] [Commented] (THRIFT-2998) Node.js: Missing header from http request
[ https://issues.apache.org/jira/browse/THRIFT-2998?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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)
[jira] [Commented] (THRIFT-2998) Node.js: Missing header from http request
[ https://issues.apache.org/jira/browse/THRIFT-2998?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14569069#comment-14569069 ] ASF GitHub Bot commented on THRIFT-2998: Github user larsxschneider commented on the pull request: https://github.com/apache/thrift/pull/378#issuecomment-107948285 @RandyAbernethy Looks like a good workaround for now. Any reason not to merge? :smile: 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)
[jira] [Commented] (THRIFT-2998) Node.js: Missing header from http request
[ https://issues.apache.org/jira/browse/THRIFT-2998?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14569398#comment-14569398 ] ASF GitHub Bot commented on THRIFT-2998: Github user RandyAbernethy commented on the pull request: https://github.com/apache/thrift/pull/378#issuecomment-108011615 No worse than no header I suppose, however Thrift media types are now per protocol and registered with IANA: http://www.iana.org/assignments/media-types/media-types.xhtml#application - vnd.apache.thrift.binary - vnd.apache.thrift.compact - vnd.apache.thrift.json Would be nice if we could mount a Thrift wide effort to get these into Thrift v1.0. If you need application/x-thrift in the mean time I suppose we could commit it with a TODO. Thoughts? 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)
[jira] [Commented] (THRIFT-2998) Node.js: Missing header from http request
[ https://issues.apache.org/jira/browse/THRIFT-2998?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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 traian.sta...@autodesk.com 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)
[jira] [Commented] (THRIFT-2998) Node.js: Missing header from http request
[ https://issues.apache.org/jira/browse/THRIFT-2998?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14320381#comment-14320381 ] Randy Abernethy commented on THRIFT-2998: - This is a great patch. Post THRIFT-2756 the official media type should probably be based on the actual type of media (therefore the serialization protocol). The IANA registered media types are: - vnd.apache.thrift.json - vnd.apache.thrift.binary - vnd.apache.thrift.compact I can commit this as a step in the right direction but ultimately the media type should come from the protocol. Perhaps the protocols should have a Public readonly property set to their media type that the http layer can use. Thoughts? -Randy 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)
[jira] [Commented] (THRIFT-2998) Node.js: Missing header from http request
[ https://issues.apache.org/jira/browse/THRIFT-2998?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14320675#comment-14320675 ] Traian Stanev commented on THRIFT-2998: --- I must admit I am out of my depth here. In my case I had to interface with a Thrift server, and I had a python client aleady available as resource. The Python client worked, while the Node.js client I was working on didn't work at all. I traced it down to the Python client setting this header, while the Node.js client not doing that, which was causing the server to just answer with errors for every request. My current workaround is to pass the Content-Type header as a custom header for the connection (which is supported already), so it's certainly not a blocking issue. I was not aware of the correct content types to use -- but what you say does sound as the better fix in case those are already supported. I tried using those content types against the server I use, and it did not work. 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)
[jira] [Commented] (THRIFT-2998) Node.js: Missing header from http request
[ https://issues.apache.org/jira/browse/THRIFT-2998?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14320826#comment-14320826 ] Randy Abernethy commented on THRIFT-2998: - Yes, we need to update all of the language libraries to use the registered media types. Your work around for the current code base sounds like the correct approach in the mean time. 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)