ceilometer.api.middleware improperly sets an integer Content-Length header
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ceilometer |
Fix Released
|
High
|
Ryan Petrello | ||
Icehouse |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
Ceilometer's error message parsing middleware calculates the custom error message length and sets an appropriate Content-Length header. It does this, however, by setting an integer value for the header, not a string.
Some pure Python WSGI servers in particular aren't strict and violate the WSGI specification by automatically converting the value to a string. Apache, however, does not. This results in an error when running ceilometer behind Apache for e.g., 404 errors:
[Tue Apr 08 22:45:18 2014] [error] [client 127.0.0.1] mod_wsgi (pid=21955): Exception occurred processing WSGI script '/some/
[Tue Apr 08 22:45:18 2014] [error] [client 127.0.0.1] TypeError: expected byte string object for header value, value of type int found
Changed in ceilometer: | |
importance: | Undecided → High |
Changed in ceilometer: | |
milestone: | none → juno-1 |
Changed in ceilometer: | |
status: | Fix Committed → Fix Released |
Changed in ceilometer: | |
milestone: | juno-1 → 2014.2 |
This came about as a result of a Pecan bug report on our mailing list:
https:/ /groups. google. com/forum/ #!msg/pecan- dev/Y275PSiMR3I /NdEdzS1sSdgJ