tempurl Content-Disposition header missing from HEAD
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Object Storage (swift) |
Fix Released
|
Wishlist
|
David Liu |
Bug Description
tempurl adds a Content-Disposition header for you to notate that an object should be downloaded instead of displayed inline
I'm guessing this is *not* what you want most of the time (since it mainly only matters in browsers, and browsers are better than we are at doing the right thing based on the content-type) - but nevertheless - it's always been this way [1]
The really *bad* part of this behavior is that we only do it to GETs. If you make a HEAD request (say via -I with curl) you have *no idea* that the headers are different between a tempurl request and a x-auth-token request.
I'm pretty sure HTTP says you're not supposed do different things for HEAD than you would do with GET wrt to the headers and status etc [2]
I think we just need to change the explicit check of `method == 'GET'` to a `method in ('GET', 'HEAD')` and then write a unittest and ship it! [3]
1. 7fc1721d was hard to find because of the great extract all the middleware fiasco of '12
2. https:/
3. https:/
description: | updated |
description: | updated |
Changed in swift: | |
assignee: | nobody → David Liu (lzbj) |
Fix proposed to branch: master /review. openstack. org/296936
Review: https:/