jsarcade icon indicating copy to clipboard operation
jsarcade copied to clipboard

RTS: httpserver.js sends data as text/plain

Open luhtonen opened this issue 12 years ago • 0 comments

I've installed Node.js v0.10.23 on Mac OS X 10.9 Node.js writes by default data as 'text/plain' which isn't interpreted by the browser as proper HTML. In order to get HTML response need to set header to 'text/html' just before response.write() row. Like that: response.writeHeader(200, {"Content-Type": "text/html"});

luhtonen avatar Dec 12 '13 19:12 luhtonen