makerbot/ReplicatorG — pull request #277 by gaelenh (2012-05-01 22:15:20+00:00)
Title: Added client-side firmware last-modified check

Here's another tiny bug I found around checking/downloading firmware. The firmware server I'm using isn't honoring If-Modified-Since, so every time I start ReplicatorG, it's redownloading firmware.xml and the hex files.

The server is backed by varnish, which does honor the request header, but a lot of the calls go straight to the nginx server, which isn't always honoring them. Strangely, the server does respond to ETag (If-None-Match) properly, but it looks like the downloader would need to be refactored to handle storing separate etags.

This fix will help reduce bandwidth for the server, and stop making me think that there were new drivers released. I suppose it's possible that the server is misreporting Last-Modified and the firmware could never be downloaded, but that could just as well be a problem regardless of the change.