diff MoinMoin/action/AttachFile.py @ 5326:1ba150d90d3a

custom patch for werkzeug 0.5.1 http.parse_date to catch exceptions raised by stdlib, remove exception handler at moin level
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 29 Nov 2009 16:58:27 +0100
parents abd4336edd29
children cd96baeeec9b
line wrap: on
line diff
--- a/MoinMoin/action/AttachFile.py	Sun Nov 29 02:02:04 2009 +0100
+++ b/MoinMoin/action/AttachFile.py	Sun Nov 29 16:58:27 2009 +0100
@@ -815,16 +815,7 @@
         return # error msg already sent in _access_file
 
     timestamp = datetime.datetime.fromtimestamp(os.path.getmtime(fpath))
-    try:
-        if_modified = request.if_modified_since
-    except OverflowError:
-        # there is likely a bug somewhere in stdlib or werkzeug that triggers this
-        # we collect more data about it here and avoid moin crashing
-        logging.error("complete request.environ for exception below: %r" % request.environ)
-        logging.exception("HTTP_IF_MODIFIED_SINCE == %r caused an OverflowError" %
-                          request.environ.get('HTTP_IF_MODIFIED_SINCE'))
-        if_modified = None
-
+    if_modified = request.if_modified_since
     if if_modified and if_modified >= timestamp:
         request.status_code = 304
     else: