[Openstack] [Glance] Using HTTP PATCH

Mark Nottingham mnot at mnot.net
Thu May 24 11:12:15 UTC 2012


On 24/05/2012, at 6:22 AM, Brian Waldon wrote:

> Hey guys,
> 
> I'm considering using PATCH rather than PUT for image updates in the v2 Image API, but I wanted to make sure there weren't any major blockers that I might be missing. As far as I can tell, the python libraries we use in Glance support it (httplib2, requests). However, I discovered that Squid doesn't document official support of the method: http://wiki.squid-cache.org/SquidFaq/SquidLogs.

Oh, how embarrassment. I'll get that fixed ASAP.


> I wanted to ask if there are any other key infrastructure pieces that foolishly hard-code request methods like this. It might make us want to rethink using PATCH at all.

You've found the major one above; there are probably a few over-zealous inspecting firewalls out there as well, but given that this'll run over TLS (right?), neither Squid or any other such intermediary should be a problem (they could be deployed for SSL termination and/or as reverse proxies, but Squid, at least, can be configured to accept new methods <http://www.squid-cache.org/Versions/v3/3.0/cfgman/extension_methods.html>).

The other limitation is having defined and registered patch formats. The IETF is currently working on one for JSON; it should be progressing soon. <http://tools.ietf.org/html/draft-ietf-appsawg-json-patch>

Cheers,


--
Mark Nottingham   http://www.mnot.net/







More information about the Openstack mailing list