Title: NodeJS disconnects when "Upgrade" HTTP header is used for example to advertise HTTP/2 support · Issue #4334 · nodejs/node · GitHub
Open Graph Title: NodeJS disconnects when "Upgrade" HTTP header is used for example to advertise HTTP/2 support · Issue #4334 · nodejs/node
X Title: NodeJS disconnects when "Upgrade" HTTP header is used for example to advertise HTTP/2 support · Issue #4334 · nodejs/node
Description: More details in this issue: icing/mod_h2#73 as this was originally raised with the Apache HTTP/2 project but they have identified this as a Node issue. Nodejs https (and http) fails to parse certain HTTP responses with an Upgrade header....
Open Graph Description: More details in this issue: icing/mod_h2#73 as this was originally raised with the Apache HTTP/2 project but they have identified this as a Node issue. Nodejs https (and http) fails to parse certai...
X Description: More details in this issue: icing/mod_h2#73 as this was originally raised with the Apache HTTP/2 project but they have identified this as a Node issue. Nodejs https (and http) fails to parse certai...
Opengraph URL: https://github.com/nodejs/node/issues/4334
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"NodeJS disconnects when \"Upgrade\" HTTP header is used for example to advertise HTTP/2 support","articleBody":"More details in this issue: https://github.com/icing/mod_h2/issues/73 as this was originally raised with the Apache HTTP/2 project but they have identified this as a Node issue.\n\nNodejs https (and http) fails to parse certain HTTP responses with an Upgrade header.\n\nThis fails:\n\n```\nHTTP/1.1 200 OK\nDate: Thu, 17 Dec 2015 15:17:46 GMT\nServer: Apache/2.5.0-dev (Unix) OpenSSL/1.0.2e\nUpgrade: h2\nConnection: Upgrade, Keep-Alive\nLast-Modified: Thu, 17 Dec 2015 15:17:39 GMT\nETag: \"7d5-5271985fa6ac0\"\nAccept-Ranges: bytes\nContent-Length: 2005\nKeep-Alive: timeout=5\nContent-Type: text/html\n```\n\nwhile this answer succeeds:\n\n```\nHTTP/1.1 200 OK\nDate: Thu, 17 Dec 2015 15:19:59 GMT\nServer: Apache/2.5.0-dev (Unix) OpenSSL/1.0.2e\nLast-Modified: Thu, 17 Dec 2015 15:19:56 GMT\nETag: \"7d5-527198e24df00\"\nAccept-Ranges: bytes\nContent-Length: 2005\nKeep-Alive: timeout=5\nConnection: Keep-Alive\nContent-Type: text/html\n```\n\nEither it is the Upgrade response header or the Upgrade token in the Connection.\n\nTo repeat, make a call my site (www.tunetheweb.com) using standard https call like below:\n\n``` javascript\nvar https = require('https');\n\nvar options = {\n hostname: 'www.tunetheweb.com',\n path: '/',\n};\n\nvar req = https.request(options, function(res) {\n console.log(\"statusCode: \", res.statusCode);\n console.log(\"headers: \", res.headers);\n\n res.on('data', function(d) {\n process.stdout.write(d);\n });\n});\nreq.end();\n\nreq.on('error', function(e) {\n console.log(e);\n});\n```\n\nApache 2.4.18 introduced these headers when using HTTP/2 through the mod_http2 module and NodeJS is now unable to connect to any Apache server using HTTP/2. NodeJS was able to connect using Apache 2.4.17 even when H2 was supported as the upgrade headers were not advertised.\n\nUpgrade headers are part of the HTTP spec (http://www.w3.org/Protocols/rfc2616/rfc2616.txt) and Node should ignore any unsupported upgrade protocol suggestions and continue using HTTP/1.1. Instead it disconnects.\n\nThanks,\nBarry\n","author":{"url":"https://github.com/tunetheweb","@type":"Person","name":"tunetheweb"},"datePublished":"2015-12-17T16:31:12.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":11},"url":"https://github.com/4334/node/issues/4334"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:85b90920-ce2b-5540-3ccf-c907bab2df58 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AE56:306D2B:5316A9:763034:6A4E6F8C |
| html-safe-nonce | 1e8e59a88644627ddde4cff33c73dd89e5fb17028c1dab1f987829ca39cf0cb8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRTU2OjMwNkQyQjo1MzE2QTk6NzYzMDM0OjZBNEU2RjhDIiwidmlzaXRvcl9pZCI6Ijg2MzExNTYwNzA2ODc4NjI2NjgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 84723550624c6f6ee5f8babbf7022e77b733b2b63a4b66b541e50f4870cd29bf |
| hovercard-subject-tag | issue:122770727 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/4334/issue_layout |
| twitter:image | https://opengraph.githubassets.com/bbe4e60d5d563f783afddb7867dc539f2056aec587e39f6a7864d150b23be7c4/nodejs/node/issues/4334 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/bbe4e60d5d563f783afddb7867dc539f2056aec587e39f6a7864d150b23be7c4/nodejs/node/issues/4334 |
| og:image:alt | More details in this issue: icing/mod_h2#73 as this was originally raised with the Apache HTTP/2 project but they have identified this as a Node issue. Nodejs https (and http) fails to parse certai... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | tunetheweb |
| hostname | github.com |
| expected-hostname | github.com |
| None | 41b6ab3ba6d20a71766ac245b5a4a94c6fc672a9cd4da7d44c1b33ab8bf6a21c |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e6a744804e8e70f97b4d5a18a94dcc63db22f97a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width