Having the choice of the weak caching headers
_ETags_, automatically applied to static resources served by Jester, could cause problems in some cases, especially when using Jester in reverse proxy mode with nginx. In my case, when I'm using nginx to gzip the static content coming from Jester, the ETag is removed by nginx. This is a problem when you want effective caching of your ressources and this is required by PageSpeed in order to get a better score.

To remedy the situation, one could use the other weak caching existing header which is the _Last-Modified_ response header.

It appears from [this RFC](https://tools.ietf.org/html/rfc2616#section-13.3.4) that the recommended behavior is to use both.

My idea was to propose some variables to pass to Jester in order to decide which one(s) we want to turn on and off. Maybe a `setStaticHeaders` function in order to be able to choose the weak caching methods we want (none, etag, last-modified or both).

Here's a comparison of both methods with my temporary solution:

**ETag version (actually in Jester)**

```
var hashed = getMD5(file)

await client.statusContent($Http200, file, {
                                   "Content-Type": mimetype,
                                   "ETag": hashed }.newStringTable)
```

**Last-Modified version**

```
let lastmodified = getGMTime(getLastModificationTime(p))

await client.statusContent($Http200, file, {
                                   "Content-Type": mimetype,
                                   "Last-Modified": format(lastmodified, "ddd, dd MMM yyyy HH:mm:ss") & " GMT" }.newStringTable)
```

I don't know if this is correct but according to [Wikipedia](https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#Response_fields), the date must be in this format. I hard-coded GMT because with `ZZZ`, Nim puts `UTC`, which though is the equivalent of `GMT`, but the convention seems to use `GMT`.

This code uses the [getLastModificationTime](http://nim-lang.org/docs/os.html#getLastModificationTime,string) function from os package in order to get the last modification time of the resource.

---

The best would be to have a route for specific static files (like a `static` template keyword) on which we could match and apply differents parameters then return or resp the matched file. Example: I want a specific `Expires` header on css files. The idea is to give away nginx more and more and just using it as a pure reverse proxy.

I think it's cleaner to directly handle this in Jester than matching the passing files on-the-fly in nginx, especially when the developer wants full control on things. More, when doing this you are managing two routing tables, this is not very efficient and error prone.
