Title: ERR_INVALID_CHAR when response.setHeader() · Issue #21509 · nodejs/node · GitHub
Open Graph Title: ERR_INVALID_CHAR when response.setHeader() · Issue #21509 · nodejs/node
X Title: ERR_INVALID_CHAR when response.setHeader() · Issue #21509 · nodejs/node
Description: v10.5.0 _http_outgoing.js:465 throw err; ^ TypeError [ERR_INVALID_CHAR]: Invalid character in header content ["set-cookie"] at ServerResponse.setHeader (_http_outgoing.js:474:3) at ClientRequest.getHttp.request.on.destResp (/app.js:77:8)...
Open Graph Description: v10.5.0 _http_outgoing.js:465 throw err; ^ TypeError [ERR_INVALID_CHAR]: Invalid character in header content ["set-cookie"] at ServerResponse.setHeader (_http_outgoing.js:474:3) at ClientRequest.ge...
X Description: v10.5.0 _http_outgoing.js:465 throw err; ^ TypeError [ERR_INVALID_CHAR]: Invalid character in header content ["set-cookie"] at ServerResponse.setHeader (_http_outgoing.js:474:3) at Client...
Opengraph URL: https://github.com/nodejs/node/issues/21509
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ERR_INVALID_CHAR when response.setHeader()","articleBody":"v10.5.0\r\n\r\n```\r\n_http_outgoing.js:465\r\n throw err;\r\n ^\r\n\r\nTypeError [ERR_INVALID_CHAR]: Invalid character in header content [\"set-cookie\"]\r\n at ServerResponse.setHeader (_http_outgoing.js:474:3)\r\n at ClientRequest.getHttp.request.on.destResp (/app.js:77:8)\r\n at ClientRequest.emit (events.js:182:13)\r\n at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:546:21)\r\n at HTTPParser.parserOnHeadersComplete (_http_common.js:109:17)\r\n at TLSSocket.socketOnData (_http_client.js:432:20)\r\n at TLSSocket.emit (events.js:182:13)\r\n at addChunk (_stream_readable.js:283:12)\r\n at readableAddChunk (_stream_readable.js:264:11)\r\n at TLSSocket.Readable.push (_stream_readable.js:219:10)\r\n```\r\n\r\n\r\n```\r\n[ 'ASP.NET_SessionId=xqf01rjz5pjz3rbbus5xrci5; path=/; HttpOnly',\r\n 'PCTR=638232021456825698; domain=.example.com; expires=Sat, 24-Jun-2023 18:15:45 GMT; path=/',\r\n 'UserPrefsCookie=languageId=2\u0026priceStyle=decimal\u0026linesTypeView=c\u0026device=d\u0026languageGroup=all; domain=.example.com; expires=Tue, 24-Jul-2018 18:15:45 GMT; path=/',\r\n 'psCDN=CDN1; domain=.example.com; expires=Thu, 24-Jun-2021 18:15:45 GMT; path=/',\r\n 'visid_incap_801031=Emf8gIVHQf+3J7VJh12IqdDfL1sAAAAAQUIPAAAAAABCbZpNqDRMI1vWsDMXDa4H; expires=Mon, 24 Jun 2019 07:52:32 GMT; path=/; Domain=.example.com',\r\n 'incap_ses_473_801031=2PKoDGDp4EjiWeL38m+QBtDfL1sAAAAAy8XlOsjePLPdpDeegKlRLg==; path=/; Domain=.example.com',\r\n '___utmvmtEuYYEz=hCwVZbrIQLz; path=/; Max-Age=900',\r\n '___utmvatEuYYEz=cXf\\u0001GjxA; path=/; Max-Age=900',\r\n '___utmvbtEuYYEz=RZt XUTOQalb: stW; path=/; Max-Age=900' ],\r\n\r\n```\r\n\r\nPresumably it's \\u0001 , is identified an unicode? That's not my server response headers, so it's being served for a long time and others server are accepting it without any issues... So why node.js is not willing to accept that one when i'm trying to proxy request further by setting it via .setHeader() ?\r\n\r\n","author":{"url":"https://github.com/Somebi","@type":"Person","name":"Somebi"},"datePublished":"2018-06-24T18:25:04.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/21509/node/issues/21509"}
| 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:8e027e7f-9501-da12-c402-542c8c71fe03 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 917C:F68D5:155CEA:1EA930:6A4D06F1 |
| html-safe-nonce | 00e62a2a5a99e6a24c0ea7752e49584ab59656bc59a9c491bf66826d46480297 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MTdDOkY2OEQ1OjE1NUNFQToxRUE5MzA6NkE0RDA2RjEiLCJ2aXNpdG9yX2lkIjoiNDE3MjI2Nzc4NzMwODA0MTk2OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 74cdfe5c4cea9e3ef114eb1ad3700c5f5828542691fa96cf1389ec093ab01e5d |
| hovercard-subject-tag | issue:335200819 |
| 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/21509/issue_layout |
| twitter:image | https://opengraph.githubassets.com/774afbc2164b70d8ea4a8f259b607f055995efdb6df664925465b9ce2a803a85/nodejs/node/issues/21509 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/774afbc2164b70d8ea4a8f259b607f055995efdb6df664925465b9ce2a803a85/nodejs/node/issues/21509 |
| og:image:alt | v10.5.0 _http_outgoing.js:465 throw err; ^ TypeError [ERR_INVALID_CHAR]: Invalid character in header content ["set-cookie"] at ServerResponse.setHeader (_http_outgoing.js:474:3) at ClientRequest.ge... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Somebi |
| hostname | github.com |
| expected-hostname | github.com |
| None | 31e4db13a9e20081f2fac78f441659a6576e582bbb15e153f9c7fb6473aa29f5 |
| 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 | fb70bd3c4b2bec429781b65419e912c66e2d5581 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width