server_type use _() gettext may lead post metadata failed

Bug #1042142 reported by Alex Yang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
Fix Released
Undecided
Alex Yang

Bug Description

In the proxy-server, the account, container and object controller use the gettext function to wrap the server_type.
The transfer_headers() will filter the headers which is not start with 'x-{server_type}-meta-'.
It works well in the system of English language. If the system language is Chinese or Japanese, the headers which starts with 'X-Container-Meta-' and 'X-Account-Meta-' will be filtered because the gettext function will translate the server_type into Chinese or Japanese.

Alex Yang (alexyang)
Changed in swift:
assignee: nobody → Sina Web Service Dev (sws)
Alex Yang (alexyang)
Changed in swift:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to swift (master)

Fix proposed to branch: master
Review: https://review.openstack.org/12033

Changed in swift:
assignee: Sina Web Service Dev (sws) → Alex Yang (alexyang)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to swift (master)

Reviewed: https://review.openstack.org/12033
Committed: http://github.com/openstack/swift/commit/2a38a040924b621bce4e999b3c7dab692f497a21
Submitter: Jenkins
Branch: master

commit 2a38a040924b621bce4e999b3c7dab692f497a21
Author: Alex Yang <email address hidden>
Date: Tue Aug 28 10:51:49 2012 +0800

    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

Changed in swift:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in swift:
milestone: none → 1.7.0
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.