#! /bin/sh /usr/share/dpatch/dpatch-run ## 07_send_file_fix.dpatch by Alexander Goldstein ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Catch NotModified exceptions when sending a file. @DPATCH@ diff -urNad roundup-0.7.10/roundup/cgi/client.py /tmp/dpep.wdmWVY/roundup-0.7.10/roundup/cgi/client.py --- roundup-0.7.10/roundup/cgi/client.py 2004-12-03 23:21:31.000000000 +0100 +++ /tmp/dpep.wdmWVY/roundup-0.7.10/roundup/cgi/client.py 2005-01-04 11:33:40.000000000 +0100 @@ -227,7 +227,12 @@ self.response_code = 302 self.write('Redirecting to %s'%(url, url)) except SendFile, designator: - self.serve_file(designator) + try: + self.serve_file(designator) + except NotModified: + # send the 304 response + self.request.send_response(304) + self.request.end_headers() except SendStaticFile, file: try: self.serve_static_file(str(file))