Remove the gettext wrapper of server_type.

The gettext wrapper of server_type in controllers is used to translate
server_type in log. But the transfer_headers function which used to
filter the illegal metadata headers use the wrapped server_type. So, it
will cause problems that 'X-Account-Meta-' and 'X-Container-Meta-' would
be filtered when the language of operating system is not english, such
as Chinese or Japnese. So, I removed the wrapper.

Change-Id: I7d47e67b4caf5d0be171a90740f9bb12fa2cba84
Fixes: Bug #1042142
This commit is contained in:
Alex Yang 2012-08-28 10:51:49 +08:00
parent e630e7c9d6
commit 2a38a04092
4 changed files with 4 additions and 4 deletions

View File

@ -39,7 +39,7 @@ from swift.proxy.controllers.base import Controller
class AccountController(Controller):
"""WSGI controller for account requests"""
server_type = _('Account')
server_type = 'Account'
def __init__(self, app, account_name, **kwargs):
Controller.__init__(self, app)

View File

@ -87,7 +87,7 @@ def get_container_memcache_key(account, container):
class Controller(object):
"""Base WSGI controller class for the proxy"""
server_type = _('Base')
server_type = 'Base'
# Ensure these are all lowercase
pass_through_headers = []

View File

@ -40,7 +40,7 @@ from swift.proxy.controllers.base import Controller, delay_denial, \
class ContainerController(Controller):
"""WSGI controller for container requests"""
server_type = _('Container')
server_type = 'Container'
# Ensure these are all lowercase
pass_through_headers = ['x-container-read', 'x-container-write',

View File

@ -232,7 +232,7 @@ class SegmentedIterable(object):
class ObjectController(Controller):
"""WSGI controller for object requests."""
server_type = _('Object')
server_type = 'Object'
def __init__(self, app, account_name, container_name, object_name,
**kwargs):