Title: 304 Page Not Modified returns content after headers · Issue #13 · incrementalcode/lightnode · GitHub
Open Graph Title: 304 Page Not Modified returns content after headers · Issue #13 · incrementalcode/lightnode
X Title: 304 Page Not Modified returns content after headers · Issue #13 · incrementalcode/lightnode
Description: RFC 2616 for HTTP/1.1 dictates that a 304 Page-Not-Modified should have no body. ... The 304 response MUST NOT contain a message-body, and thus is always terminated by the first empty line after the header fields.... lightnode currently ...
Open Graph Description: RFC 2616 for HTTP/1.1 dictates that a 304 Page-Not-Modified should have no body. ... The 304 response MUST NOT contain a message-body, and thus is always terminated by the first empty line after th...
X Description: RFC 2616 for HTTP/1.1 dictates that a 304 Page-Not-Modified should have no body. ... The 304 response MUST NOT contain a message-body, and thus is always terminated by the first empty line after th...
Opengraph URL: https://github.com/incrementalcode/lightnode/issues/13
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"304 Page Not Modified returns content after headers","articleBody":"RFC 2616 for HTTP/1.1 dictates that a 304 Page-Not-Modified should have no body.\n\n... The 304 response MUST NOT contain a message-body, and thus is always terminated by the first empty line after the header fields....\n\nlightnode currently uses the chunked encoding header for all responses, including 304s. This results in a \"0\\r\\n\" following the message headers.\n\nThe following change to move the chunked header to the else clause resolves the issue for me.\n\n``` javascript\n\n //REMOVED headers['transfer-encoding'] = 'chunked'\n headers['server'] = 'lightnode'\n\n if (Date.parse(file.header.mtime) \u003c= Date.parse(req.headers['if-modified-since'])) {\n resp.writeHead(304, headers)\n resp.end()\n return\n }\n else {\n headers['transfer-encoding'] = 'chunked' // ADDED\n```\n","author":{"url":"https://github.com/eoinsha","@type":"Person","name":"eoinsha"},"datePublished":"2012-06-27T10:40:21.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/13/lightnode/issues/13"}
| 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:4b14d232-6bd3-f7e6-5626-ba4c437fece8 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B8BA:2DAA69:20B2322:2EBD9FD:6A50F6D2 |
| html-safe-nonce | 5814ce91bd1aff5d30ca9133f72d419da3f138b27d350c3145a51c9ac8c334b9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOEJBOjJEQUE2OToyMEIyMzIyOjJFQkQ5RkQ6NkE1MEY2RDIiLCJ2aXNpdG9yX2lkIjoiMzE2MjMxMTU1NzcwODMxNDMyMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | f636e6c4f06849342f6ee45f41abe6f68582ada8b6302639c701fe14c765f260 |
| hovercard-subject-tag | issue:5294262 |
| 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/incrementalcode/lightnode/13/issue_layout |
| twitter:image | https://opengraph.githubassets.com/99ef3ca4a38bd62e4daafea69dbc12aa879558a170def3f5e93ee19de6072387/incrementalcode/lightnode/issues/13 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/99ef3ca4a38bd62e4daafea69dbc12aa879558a170def3f5e93ee19de6072387/incrementalcode/lightnode/issues/13 |
| og:image:alt | RFC 2616 for HTTP/1.1 dictates that a 304 Page-Not-Modified should have no body. ... The 304 response MUST NOT contain a message-body, and thus is always terminated by the first empty line after th... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | eoinsha |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5266e58c17a510c403505cc811606465e90a881d2007ee7df1c4800d5c659838 |
| turbo-cache-control | no-preview |
| go-import | github.com/incrementalcode/lightnode git https://github.com/incrementalcode/lightnode.git |
| octolytics-dimension-user_id | 557552 |
| octolytics-dimension-user_login | incrementalcode |
| octolytics-dimension-repository_id | 1350871 |
| octolytics-dimension-repository_nwo | incrementalcode/lightnode |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1350871 |
| octolytics-dimension-repository_network_root_nwo | incrementalcode/lightnode |
| 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 | 8d836581d020676cc0ef4a83cd2fe17e4af02c3d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width