Content-Length and Transfer-Encoding are mutually exclusive HTTP headers
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance |
Fix Released
|
High
|
Mike Lundy | ||
Essex |
Fix Released
|
Undecided
|
Unassigned | ||
glance (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Precise |
Fix Released
|
Undecided
|
Chuck Short |
Bug Description
If the glance api server is behind a conforming HTTP/1.1 reverse proxy (pound, in this example), all uploaded images will be corrupted. This is because glance.client sends both the "Content-Length" and "Transfer-Encoding: chunked" headers. The HTTP/1.1 spec (http://
"If a message is received with both a Transfer-Encoding header field and a Content-Length header field, the latter MUST be ignored."
The glance client is sending Content-Length first, and pound sanitizes the request, so it rightfully strips out the Transfer-Encoding. This means that the chunk sizes in the body of the request are written as data to the image, resulting in a corrupted image.
This affects diablo, essex, and folsom, though it will only affect non-sendfile platforms on essex and folsom (since that codepath is not affected).
Related branches
- Ubuntu Server Developers: Pending requested
-
Diff: 31 lines (+10/-3)2 files modifieddebian/changelog (+6/-0)
debian/glance-common.postinst (+4/-3)
description: | updated |
description: | updated |
Changed in glance: | |
importance: | Undecided → High |
Changed in glance: | |
milestone: | none → folsom-1 |
Changed in glance: | |
status: | Fix Committed → Fix Released |
Changed in glance (Ubuntu): | |
status: | New → In Progress |
Changed in glance (Ubuntu Precise): | |
status: | New → In Progress |
Changed in glance (Ubuntu Precise): | |
assignee: | nobody → Chuck Short (zulcss) |
milestone: | none → ubuntu-12.04.1 |
tags: |
added: verification-done removed: verification-needed |
Changed in glance (Ubuntu): | |
status: | In Progress → Fix Released |
Changed in glance: | |
milestone: | folsom-1 → 2012.2 |
Fix proposed to branch: master /review. openstack. org/6563
Review: https:/