{"comment":{"created_at":"2011-10-23T07:51:11Z","body":"+1 to pavel's point about checking for a file with the added gz suffix.  This is how they do in in Jetty's DefaultServlet.\r\n\r\nIt is highly efficient because the server doesn't re-gzip things on the fly all the time.  Instead, the user declares which static files he wants to send gzipped by gzipping them along with the uncompressed file.\r\n\r\nWhen done this way, it makes perfect sense to do it as part of the static file server because we're just deciding to serve up a different static file if the client presents the right header and we spot a '.gz' file ready for serving.\r\n\r\nSaves CPU time compared to an on-the-fly gzipping in the core of node and saves bandwidth, too!\r\n\r\n","updated_at":"2011-10-23T07:51:11Z","url":"https://api.github.com/repos/cloudhead/node-static/issues/comments/2494399","id":2494399,"user":{"gravatar_id":"8c88b43c635ed013bf4101c33d0f0667","avatar_url":"https://secure.gravatar.com/avatar/8c88b43c635ed013bf4101c33d0f0667?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/dobesv","id":327833,"login":"dobesv"}},"action":"created","issue":{"number":20,"created_at":"2011-01-22T21:10:53Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"Seems given the current implementation there is no way to put in a simple handler for gzip compression. This would be quite useful for speeding up some files being served.\r\n\r\nI'm not saying put a full middleware stack in there for your static files, but just a single flag \"gzip\", which can optionally gzip files that match a given regexp. \r\n\r\nThoughts?","comments":7,"title":"Gzip support","updated_at":"2011-10-23T07:51:11Z","url":"https://api.github.com/repos/cloudhead/node-static/issues/20","id":544236,"assignee":null,"milestone":null,"closed_at":null,"user":{"gravatar_id":"d43e8ea63b61e7669ded5b9d3c2e980f","avatar_url":"https://secure.gravatar.com/avatar/d43e8ea63b61e7669ded5b9d3c2e980f?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/indexzero","id":4624,"login":"indexzero"},"html_url":"https://github.com/cloudhead/node-static/issues/20","labels":[],"state":"open"},"legacy":{"issue_id":544236,"comment_id":2494399}}