summaryrefslogtreecommitdiff
path: root/docs/comment-example.txt
diff options
context:
space:
mode:
Diffstat (limited to 'docs/comment-example.txt')
-rw-r--r--docs/comment-example.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/comment-example.txt b/docs/comment-example.txt
index aa6505c..e108382 100644
--- a/docs/comment-example.txt
+++ b/docs/comment-example.txt
@@ -175,7 +175,7 @@ filter responses that aren't HTML. So we get:
def __call__(self, environ, start_response):
req = Request(environ)
resp = req.get_response(self.app)
- if resp.content_type != 'text/html' or resp.status_int != 200:
+ if resp.content_type != 'text/html' or resp.status_code != 200:
return resp(environ, start_response)
data = self.get_data(req.url)
... do stuff with data, update resp ...
@@ -286,7 +286,7 @@ So here's what this all looks like:
# This is the base path of *this* middleware:
base_url = req.application_url
resp = req.get_response(self.app)
- if resp.content_type != 'text/html' or resp.status_int != 200:
+ if resp.content_type != 'text/html' or resp.status_code != 200:
# Not an HTML response, we don't want to
# do anything to it
return resp(environ, start_response)