Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Currently, files which fail to match contentTypeMatch are served with…
… the underlying connect.static.send which defaults to maxAge=0 (i.e. they are immediately stale). This has the undesirable consequence that any image files served by gZippo are thus never cached by the browser (the browser does reuse the file, but it always queries the server with an If-Modified-Since). With this change, we use gZippo's maxAge value when 'pass'ing to connect. This brings up an interesting issue of whether gZippo is intended solely for gzippable content ... or whether it should try to replicate normal 'static' middleware behavior for other content types (e.g. images). It might be interesting to contemplate using the same 'options' format for gZippo as the underlying connect middleware for maximum overlap.
- Loading branch information