Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix for Content-MD5 reset

  • Loading branch information...
commit 88c79e9404fab27fee4105d79caacdf2fd36f57f 1 parent 4516a40
@maluke maluke authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 webob/__init__.py
View
8 webob/__init__.py
@@ -1673,8 +1673,12 @@ def _body__set(self, value):
raise TypeError(
"You can only set the body to a str (not %s)"
% type(value))
- if self._body or self._app_iter:
- self.content_md5 = None
+ try:
+ if self._body or self._app_iter:
+ self.content_md5 = None
+ except AttributeError:
+ # if setting body early in initialization _body and _app_iter don't exist yet
+ pass
self._body = value
self.content_length = len(value)
self._app_iter = None
Please sign in to comment.
Something went wrong with that request. Please try again.