~ubuntu-branches/ubuntu/trusty/swift/trusty-updates

« back to all changes in this revision

Viewing changes to swift/common/middleware/account_quotas.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short, James Page, Chuck Short
  • Date: 2013-08-13 10:37:13 UTC
  • mfrom: (1.2.21)
  • Revision ID: package-import@ubuntu.com-20130813103713-1ctbx4zifyljs2aq
Tags: 1.9.1-0ubuntu1
[ James Page ]
* d/control: Update VCS fields for new branch locations.

[ Chuck Short ]
* New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
 
54
54
 
55
55
class AccountQuotaMiddleware(object):
56
 
    """ Account quota middleware
 
56
    """Account quota middleware
57
57
 
58
58
    See above for a full description.
59
59
 
73
73
            return self.app
74
74
 
75
75
        new_quota = request.headers.get('X-Account-Meta-Quota-Bytes')
 
76
        remove_quota = request.headers.get('X-Remove-Account-Meta-Quota-Bytes')
 
77
        if remove_quota:
 
78
            new_quota = 0    # X-Remove dominates if both are present
76
79
 
77
80
        if request.environ.get('reseller_request') is True:
78
81
            if new_quota and not new_quota.isdigit():