Re: [nodejs] Trouble with response.writeHead
Thank you for the responses. I did not read the article posted, but I did run the node app without nginx just now, and I think all header entries now appear as they should. I'm rushing through this while at work with limited tools, therefor the I think part. But it does seem to now point to nginx. Funny, I asked on the nginx IRC and they totally pointed me back to node, as if nginx could do no wrong. Looks like I need to get on that article in the first reply. Thank you! On Monday, June 22, 2015 at 11:47:11 PM UTC-4, ryandesign wrote: On Jun 22, 2015, at 9:14 AM, Ecas Saeculum wrote: Simple HTTP Server, that responds on connection with a write head and response.end('hello'); Simple, simple. When I do this: response.writeHead(200, { 'Content-Type': 'text/plain', 'ETag': 'someETagHash', 'Content-Size': '10' }); web page header has Content-Type and Content-Size. When I remove Content-Type: response.writeHead(200, { 'ETag': 'someETagHash', 'Content-Size': '10' }); Web page receives the ETag. I'm using nginx as reverse proxy, and nginx is sending no headers to the client. Node.js 0.10, no other packages. Just checking to see if anyone else has seen something similar. I have almost 20 hours into troubleshooting this and I'm probably just going to run without a Content-Type, if no one has seen something like this. I've tried escaping and quoting each/all entries every way I can think of. I've cleared out my nginx config to bare bones. I'm not seeing any ill effects without a Content-Type, but it is kind of an annoying issue. Content-Type seems like a pretty important header to send, no? Does this problem occur if you access your node app directly, and do not reverse proxy through nginx? -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines --- You received this message because you are subscribed to the Google Groups nodejs group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. To post to this group, send email to nodejs@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/b216b395-5220-4188-9918-d26c453a6428%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [nodejs] Trouble with response.writeHead
I just disabled nginx, added 'Content-Type' back into my node app, cleared my browser cache and fired up node without nginx. All headers now appear. Funny thing, I went to the Nginx IRC channel looking for ideas, and they immediately talked me back into my node app being the problem. Now I need to get on that article from the first repsonse. thank you! On Monday, June 22, 2015 at 11:47:11 PM UTC-4, ryandesign wrote: On Jun 22, 2015, at 9:14 AM, Ecas Saeculum wrote: Simple HTTP Server, that responds on connection with a write head and response.end('hello'); Simple, simple. When I do this: response.writeHead(200, { 'Content-Type': 'text/plain', 'ETag': 'someETagHash', 'Content-Size': '10' }); web page header has Content-Type and Content-Size. When I remove Content-Type: response.writeHead(200, { 'ETag': 'someETagHash', 'Content-Size': '10' }); Web page receives the ETag. I'm using nginx as reverse proxy, and nginx is sending no headers to the client. Node.js 0.10, no other packages. Just checking to see if anyone else has seen something similar. I have almost 20 hours into troubleshooting this and I'm probably just going to run without a Content-Type, if no one has seen something like this. I've tried escaping and quoting each/all entries every way I can think of. I've cleared out my nginx config to bare bones. I'm not seeing any ill effects without a Content-Type, but it is kind of an annoying issue. Content-Type seems like a pretty important header to send, no? Does this problem occur if you access your node app directly, and do not reverse proxy through nginx? -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines --- You received this message because you are subscribed to the Google Groups nodejs group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. To post to this group, send email to nodejs@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/a5c724d6-de12-4f40-ab2f-3d2c4dfdf5ea%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [nodejs] Trouble with response.writeHead
I would expect NGINX to be doing some level of caching based on the ETag, but I would also expect it to be using the Content-Type as part of the cache validation, which is controlled by the Vary header. Here's a reasonable looking article (I only skimmed) on it that might give you enough background to know whether that is a factor: https://www.fastly.com/blog/best-practices-for-using-the-vary-header that ~Ryan On Mon, 22 Jun 2015 at 07:22 Ecas Saeculum ecas@gmail.com wrote: Reaching the end of my rope, so I thought I'd check here to see if anyone has experienced anything similar. Simple HTTP Server, that responds on connection with a write head and response.end('hello'); Simple, simple. When I do this: response.writeHead(200, { 'Content-Type': 'text/plain', 'ETag': 'someETagHash', 'Content-Size': '10' }); web page header has Content-Type and Content-Size. When I remove Content-Type: response.writeHead(200, { 'ETag': 'someETagHash', 'Content-Size': '10' }); Web page receives the ETag. I'm using nginx as reverse proxy, and nginx is sending no headers to the client. Node.js 0.10, no other packages. Just checking to see if anyone else has seen something similar. I have almost 20 hours into troubleshooting this and I'm probably just going to run without a Content-Type, if no one has seen something like this. I've tried escaping and quoting each/all entries every way I can think of. I've cleared out my nginx config to bare bones. I'm not seeing any ill effects without a Content-Type, but it is kind of an annoying issue. -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines --- You received this message because you are subscribed to the Google Groups nodejs group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. To post to this group, send email to nodejs@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/8c45346c-fbf4-4cc2-8163-b0e06079452d%40googlegroups.com https://groups.google.com/d/msgid/nodejs/8c45346c-fbf4-4cc2-8163-b0e06079452d%40googlegroups.com?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines --- You received this message because you are subscribed to the Google Groups nodejs group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. To post to this group, send email to nodejs@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/CAGjmZGwK-HoHgKdKi2rBQ6_CNaCNS7bp%2BCFi0atzUpCG3zhgwg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.