If both etag and last-modified are saved for a feed, send only the etag the next time it is fetched (in the if-none-match header).

Supposedly it should be possible to send both if-none-match and if-modified-since headers. However the XKCD atom feed returns a 412 error in this case in which the body is not valid GZip, despite declaring a Content-encoding: gzip. This means the RestClient class throws an error when trying to download it.

The best solution I've found is to give precedence to the etag, so that when both values are present only the etag is sent to the server for cache control.