Skip to content

Commit

Permalink
Undo part of patch by Willys
Browse files Browse the repository at this point in the history
A regression in tests was introduced by commit
1216309, intended to
fix issue #49.

Willys' code actually seems to make sense, but I chose
to undo it because
 - It appears to be extraneous to the issue #49
 - It does not fix the tests or remove the now-unused constant

Someone should re-fix it properly. But for now I prefer tests
continue to pass.
  • Loading branch information
zaitcev committed Jun 25, 2013
1 parent 592288c commit ff8c280
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions swift3/middleware.py
Expand Up @@ -586,10 +586,11 @@ def PUT(self, env, start_response):
self._app_call(env)
status = self._get_status_int()

if status != HTTP_CREATED and status != HTTP_NO_CONTENT and \
status != HTTP_ACCEPTED:
if status != HTTP_CREATED and status != HTTP_NO_CONTENT:
if status in (HTTP_UNAUTHORIZED, HTTP_FORBIDDEN):
return get_err_response('AccessDenied')
elif status == HTTP_ACCEPTED:
return get_err_response('BucketAlreadyExists')
else:
return get_err_response('InvalidURI')

Expand Down

0 comments on commit ff8c280

Please sign in to comment.