Permalink
Browse files

refs t18481 Fixed bug (by edevil's patch)

  • Loading branch information...
hirokiky committed Jan 6, 2013
1 parent b538a4e commit 9932520a4ed963c52198081ef6358320e00f9b7f
Showing with 8 additions and 2 deletions.
  1. +8 −2 django/http/request.py
View
@@ -234,11 +234,17 @@ def _load_post_and_files(self):
def read(self, *args, **kwargs):
self._read_started = True
- return self._stream.read(*args, **kwargs)
+ try:
+ return self._stream.read(*args, **kwargs)
+ except IOError as e:
+ six.reraise(UnreadablePostError, UnreadablePostError(*e.args), sys.exc_info()[2])
def readline(self, *args, **kwargs):
self._read_started = True
- return self._stream.readline(*args, **kwargs)
+ try:
+ return self._stream.readline(*args, **kwargs)
+ except IOError as e:
+ six.reraise(UnreadablePostError, UnreadablePostError(*e.args), sys.exc_info()[2])
def xreadlines(self):
while True:

0 comments on commit 9932520

Please sign in to comment.