Need to encode HTTP headers in UTF-8

Bug #1042078 reported by Vincent Untz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
High
Vincent Untz

Bug Description

When glance is used behind mod_wsgi, I'm hitting a bug like the one described in https://groups.google.com/forum/?fromgroups=#!topic/modwsgi/HvD3TJbUkTc

The errors appearing in the apache log is this:
 TypeError: sequence of byte string values expected, value of type unicode found

This is happening because we're outputting some unicode variables in the HTTP headers, and mod_wsgi doesn't know what to do with them. Instead, we should just make sure all headers are encoded in UTF-8.

Changed in glance:
assignee: nobody → Vincent Untz (vuntz)
status: New → In Progress
Revision history for this message
Brian Waldon (bcwaldon) wrote :
Changed in glance:
importance: Undecided → High
milestone: none → folsom-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.openstack.org/11716
Committed: http://github.com/openstack/glance/commit/c59f0ab00590dec21af6f92aacdb0b73793c58db
Submitter: Jenkins
Branch: master

commit c59f0ab00590dec21af6f92aacdb0b73793c58db
Author: Vincent Untz <email address hidden>
Date: Tue Aug 21 17:17:22 2012 +0200

    Encode headers in v1 API to utf-8

    We're getting data from the registry via JSON, which means the values
    are of the unicode type. We want to output utf-8, otherwise this won't
    work if we use glance through mod_wsgi.

    Fix bug 1042078.

    Change-Id: Iadb215003db57ab25d9919341e6aba195835531c

Changed in glance:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in glance:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in glance:
milestone: folsom-rc1 → 2012.2
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.