-- wadearnold <[email protected]> wrote
(on Wednesday, 28 January 2009, 07:22 AM -0800):
> 
> I was wondering what the best practices where for adding gzip compression
> support to ZF Servers such as SOAP, XML-RPC and in my case AMF. Right now no
> headers are sent from the Zend_Amf_Server and the bootstrap just returns a
> string which is the AMF data and the bootstrap echo's out the data. From a
> design decision my gut tells me that the best place to handle if gzip
> compression should be used is in the bootstrap after a result is received
> from Zend_Amf_Server. I also don't want to add 15 lines of code that users
> of Zend Amf have to keep copying into their bootstrap just to get the
> envelope compressed. In that case I thought that I could add a
> Zend_Amf_Server->setGzipCrompression(true). Adding this now makes a ZF
> Server set output headers? Torn on where I should release this code and
> would appreciate any feedback! 

Typically, I'd implement compression at the server level -- in apache,
this would be mod_gzip or mod_deflate depending on whether or not you're
using apache 1 or 2. With this approach, you tell the server what
content types should be compressed, and the server does it transparently
to your application.

Now, if you need to _accept_ gzipped content, that's another story, and
by all means, that type of support should be added. However, I'd
encourage you to create a proposal for this support, so that others can
weigh in on the design choices.

-- 
Matthew Weier O'Phinney
Software Architect       | [email protected]
Zend Framework           | http://framework.zend.com/

Reply via email to