Merge pull request #1437 from MITx/fix/cdodge/static-content-server-return-404

change from throwing a Http404 exception, which I believe will try to re...
This commit is contained in:
Christina Roberts
2013-02-05 13:36:28 -08:00
2 changed files with 6 additions and 1 deletions

View File

@@ -21,7 +21,9 @@ class StaticContentServer(object):
try:
content = contentstore().find(loc)
except NotFoundError:
raise Http404
response = HttpResponse()
response.status_code = 404
return response
# since we fetched it from DB, let's cache it going forward
set_cached_content(content)