node-static
node-static copied to clipboard
rfc 2616 compliant HTTP static-file server module, with built-in caching.
I want to edit the response body before sending out. I can not find any event which returns the body to the callback how do I achieve this?
Hi, i cannot change "Content-Type:" header with command $ static -H '{"Content-Type": "text/html;charset=UTF-8"}' to switch-on UTF-8 node-static do not remember new Content-Type value, it use only "text/html" What's wrong? It's...
Hi, thank you for the great module. So, `response.writeHead` method is called twice when the request is not a `GET` request. For example: Save a content file to `public/index.html`: ```html...
``` file.serve(request, response).addListener('error', function (err) { console.error("Error serving " + request.url + " - " + err.message); }); ``` If I add a listener, then request times out instead of...
hello, I trying to use node-static command line, unfortunately I found that it does 301 redirect, if I add parameters to path... I sure this is wrong, 1 - because...
I'm trying to disable cache in the CLI I've tried `static -c 0 .`, `static -c false .`, `static -c 0 .`, and `static --cache=false .` None of these combinations...
https://github.com/cloudhead/node-static/blob/9fabe339698e88594ac81ddc2cb0a7065ad98113/bin/cli.js#L121
After much head scratching, I noticed query strings are removed if the trailing slashes are missing from URLs. E.g. > http://localhost:8000/foo?x=123 automatically redirects to > http://localhost:8000/foo/ whereas I think it...
Provide a way to support `Cache-Control: no-cache` or other custom caching informations. Here's a patch: ``` diff --- lib/node-static.js.orig 2014-03-04 14:13:43.000000000 +0900 +++ lib/node-static.js 2014-03-04 14:33:00.000000000 +0900 @@ -15,16 +15,26...
Files with no extension are served with content-type `"application/octet-stream"` due to https://www.npmjs.com/package/mime#mime-default-type Shouldn't they just be `undefined`?: ``` js mime.default_type = undefined ```