jgauffin / Griffin.WebServer

A web server built on top of Griffin.Framework
107 stars 42 forks source link

DiskFileService option to serve .gz versions of files if they exist and the browser accepts gzip streams. #19

Closed PhonicUK closed 8 years ago

PhonicUK commented 9 years ago

It would be nice if the DiskFileService had an option whereby if the client requests a file, and a pre-compressed .gz version exists and the client specifies that it can accept gzip streams via the Accept-Encoding: gzip header, that it serve that instead.

So if the client requested SomeScript.js and SomeScript.js.gz existed, the .gz version would be served up instead with the Content-Encoding: gzip header to match.

I have created this issue with the intent of implementing this myself.

jgauffin commented 8 years ago

Fixed with merge from PhonicUK