Thu Mar 11 16:18:11 PST 2010 Jeremy Fitzhardinge * Short circuit GET on ETags match When client does a conditional GET/HEAD with If-none-match:, if the condition fails (ie, the client's ETag matches the file's) then we can short-circuit the whole process and immediately return an empty body. New patches: [Short circuit GET on ETags match Jeremy Fitzhardinge **20100312001811 Ignore-this: 79d8f088558390001d5ba6c9a2d17bb3 When client does a conditional GET/HEAD with If-none-match:, if the condition fails (ie, the client's ETag matches the file's) then we can short-circuit the whole process and immediately return an empty body. ] { hunk ./src/allmydata/web/filenode.py 363 contentsize = filesize req.setHeader("accept-ranges", "bytes") if not self.filenode.is_mutable(): - # TODO: look more closely at Request.setETag and how it interacts - # with a conditional "if-etag-equals" request, I think this may - # need to occur after the setResponseCode below + # if the client already has the ETag then we can + # short-circuit the whole process. si = self.filenode.get_storage_index() hunk ./src/allmydata/web/filenode.py 366 - if si: - req.setETag(base32.b2a(si)) + if si and req.setETag(base32.b2a(si)): + return "" + # TODO: for mutable files, use the roothash. For LIT, hash the data. # or maybe just use the URI for CHK and LIT. rangeheader = req.getHeader('range') } Context: [setup: add licensing declaration for setuptools (noticed by the FSF compliance folks) zooko@zooko.com**20100309184415 Ignore-this: 2dfa7d812d65fec7c72ddbf0de609ccb ] [setup: fix error in licensing declaration from Shawn Willden, as noted by the FSF compliance division zooko@zooko.com**20100309163736 Ignore-this: c0623d27e469799d86cabf67921a13f8 ] [CREDITS to Jacob Appelbaum zooko@zooko.com**20100304015616 Ignore-this: 70db493abbc23968fcc8db93f386ea54 ] [desert-island-build-with-proper-versions jacob@appelbaum.net**20100304013858] [docs: a few small edits to try to guide newcomers through the docs zooko@zooko.com**20100303231902 Ignore-this: a6aab44f5bf5ad97ea73e6976bc4042d These edits were suggested by my watching over Jake Appelbaum's shoulder as he completely ignored/skipped/missed install.html and also as he decided that debian.txt wouldn't help him with basic installation. Then I threw in a few docs edits that have been sitting around in my sandbox asking to be committed for months. ] [TAG allmydata-tahoe-1.6.1 david-sarah@jacaranda.org**20100228062314 Ignore-this: eb5f03ada8ea953ee7780e7fe068539 ] Patch bundle hash: 0d730c29b79e7708178bef2bb01a55fc29949a4d