r112265 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112264‎ | r112265 | r112266 >
Date:23:14, 23 February 2012
Author:ben
Status:ok (Comments)
Tags:
Comment:
when the back end returns something other than a 404, use that HTTP status code rather than 404.
Modified paths:
  • /trunk/extensions/SwiftMedia/wmf/rewrite.py (modified) (history)

Diff [purge]

Index: trunk/extensions/SwiftMedia/wmf/rewrite.py
@@ -154,6 +154,7 @@
155155 return resp
156156 else:
157157 resp = webob.exc.HTTPNotFound('Unexpected error %s' % status)
 158+ resp.status = status.code
158159 return resp
159160
160161 # get the Content-Type.

Comments

#Comment by Aaron Schulz (talk | contribs)   23:23, 23 February 2012

Is it resp.status or resp.code?

#Comment by Bhartshorne (talk | contribs)   23:34, 23 February 2012

resp.status, according to http://docs.webob.org/en/latest/reference.html#id2. I tested it to verify.

Status & tagging log