Skip to content

Commit

Permalink
Don't bail if conneg bodies don't match, and downgrade from warning t…
Browse files Browse the repository at this point in the history
…o info. Fixes #113.
  • Loading branch information
mnot committed Dec 4, 2012
1 parent a66f987 commit cfd3b2a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 5 additions & 3 deletions redbot/speak.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -1109,15 +1109,17 @@ class VARY_HEADER_MISMATCH(Message):


class VARY_BODY_MISMATCH(Message): class VARY_BODY_MISMATCH(Message):
category = c.CONNEG category = c.CONNEG
level = l.WARN level = l.INFO
summary = { summary = {
'en': u"The response body is different when content negotiation happens." 'en': u"The response body is different when content negotiation happens."
} }
text = { text = {
'en': u"""When content negotiation is used, the response body 'en': u"""When content negotiation is used, the response body typically
shouldn't change between negotiated and non-negotiated shouldn't change between negotiated and non-negotiated
responses.<p> responses.<p>
This might be because different servers handled the two requests.<p>""" There might be legitimate reasons for this; e.g., because different
servers handled the two requests. However, RED's output may be skewed as
a result.<p>"""
} }


class VARY_ETAG_DOESNT_CHANGE(Message): class VARY_ETAG_DOESNT_CHANGE(Message):
Expand Down
1 change: 0 additions & 1 deletion redbot/subrequest/conneg.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ def done(self):
# check body # check body
if self.base.res_body_post_md5 != self.state.res_body_md5: if self.base.res_body_post_md5 != self.state.res_body_md5:
self.set_message('body', rs.VARY_BODY_MISMATCH) self.set_message('body', rs.VARY_BODY_MISMATCH)
return # Can't be sure what's going on...


# check ETag # check ETag
if (self.state.parsed_hdrs.get('etag', 1) == \ if (self.state.parsed_hdrs.get('etag', 1) == \
Expand Down

0 comments on commit cfd3b2a

Please sign in to comment.