Comment 56 for bug 1449212

Revision history for this message
clayg (clay-gerrard) wrote :

So I'm still not entirely happy with all the get_*_info changes needed to support this fix, but only because I think test test cleanup distracts from the important change of fixing the authorize callback. I definitely approve of this improvement to the environ caching, and I think i'll be much easier on us down the road - so maybe now is as good a time to fix it as any.

To reiterate the other dirty hacks that I've suggested (as opposed to using sam's *fix*) were:

a) make the tempurl callback return 401 until container acls are in place - coupling with existing behavior to indirectly prevent the authorize callback pop

b) hijack the `swift.authorize_override` environ boolean to *also* indicate that it's cheap to call authorize and update the base controller to not pop the authorize callback from preauthorized requests' environ.

c) start to fix environ caching to not rely on the proxy server setting the cache in the get_*_info() request environ, and instead use the response directly *

* N.B. I think using the get_*_info() response directly (instead of it's requests' environ) to fill in the original requests env cache is actually the correct fix - but when I started down this road the test fall out was about the same as the info_cache trick (it was starting to look a little worse actually). I found a hack that starts down the path without fully commiting to removing the request environ caching junk that I thought was ok. I'll attach that one separately.