|
One of the things that seems a little bit difficult about this is the content negotiation. Can the client safely assume that whatever server it is going to be sending the gzipped payload to will be capable of decompressing it on receipt?
From a little experimentation I've been doing, it doesn't appear that the Jetty / Ring layer of our Clojure stack will automatically enable the input stream for the incoming request to be ungzipped as it is read, if necessary. Presumably, we'll want to add some middleware to PuppetDB to wrap the inputstream with a GZIPInputStream on the server side to handle that.
Since it would seem we would need both client (terminus) and server-side changes for this ticket, do we need to worry about a new client (which can/would gzip the request body) potentially talking to an old PuppetDB server (which wouldn't know to try to gunzip the request body)? Ryan Senior - what do you think?
|