On Jun 18, 12:58 pm, "Shannon -jj Behrens" <[EMAIL PROTECTED]> wrote:
> On Mon, Jun 16, 2008 at 4:11 PM, Agustín (Cucho) Villena
>
> <[EMAIL PROTECTED]> wrote:
> > Hi!
>
> > At work we need to add the "content-length" header in all our
> > responses, but we don't want to hack any method in our controllers to
> > do that.
>
> > Is there any way to factor out this behaviour in a single place?
>
> Can you use Apache or Nginx to do that for you?

In Apache (and with mod_wsgi embedded mode at least, not sure what
will happen with daemon mode), provided complete response body is
returned in one go from WSGI application, ie., single yield or return
array of single string item, then one can enable the Apache
CONTENT_LENGTH output filter to add a content length to any response
which didn't add its own.

Will need to check code and test for daemon mode case, but don't have
time right now.

Graham
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to