# but do not actually have a body.
# http://tools.ietf.org/html/rfc7230#section-3.3
skip_body = True
- if code >= 100 and code < 200:
+ if 100 <= code < 200:
# 1xx responses should never indicate the presence of
# a body.
if "Content-Length" in headers or "Transfer-Encoding" in headers:
if self.check_etag_header():
self._write_buffer = []
self.set_status(304)
- if self._status_code in (204, 304) or (
- self._status_code >= 100 and self._status_code < 200
- ):
+ if self._status_code in (204, 304) or (100 <= self._status_code < 200):
assert not self._write_buffer, (
"Cannot send body with %s" % self._status_code
)