summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hellkamp <marc@gsites.de>2009-10-21 12:06:24 +0200
committerMarcel Hellkamp <marc@gsites.de>2009-10-21 12:06:24 +0200
commitca8b8c57df884ce93673d892b18b1372394dfd92 (patch)
tree3c1606573313f04366d7f27eb6d1d27197e81281
parent54f716b97e11e81ba655a4681493556b0397ed32 (diff)
downloadbottle-ca8b8c57df884ce93673d892b18b1372394dfd92.tar.gz
Damien found a bug with mod_wsgi when a 304 has payload. Bottle now follows rfc2616 section 4.3 correctly
-rw-r--r--bottle.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/bottle.py b/bottle.py
index ff6a021..ac1d43c 100644
--- a/bottle.py
+++ b/bottle.py
@@ -317,6 +317,8 @@ class Bottle(object):
response.status = e.http_status
output = self.error_handler.get(response.status, str)(e)
output = self.cast(output)
+ if response.status in (100, 101, 204, 304) or request.method == 'HEAD':
+ output = [] # rfc2616 section 4.3
except (KeyboardInterrupt, SystemExit, MemoryError):
raise
except Exception, e: