Hmm... right now there is no way of doing it, but it would be pretty
easy to enable it. Currently, ErlyWeb ignores the return value of
after_render controller hooks. All we need to do is make ErlyWeb take
this value and return it instead of the pre-hook rendered data. Then,
in your html_container component, you could implement this hook and
return

{response, [{html, Zipped},
  {header, {"Content-Encoding", "gzip"}}]}

It would be an easy fix but it may break existing after_render hooks
that already return something other than the rendered iolist.

Yariv

On Jan 5, 2008 11:21 AM, andrewfromfly <[EMAIL PROTECTED]> wrote:
>
> I got this working for just a yaws appmod without erlyweb.  I return
> to yaws:
>
> {ok, ZippedData} = yaws_zlib:gzip(list_to_binary(Whatever))
> [{html, Zipped},
>  {header, {"Content-Encoding", "gzip"}} ].
>
> but I'm having trouble doing this for an erlyweb app.
>
> I was going to use the {response, Elems} feature to send back the
> Content-Encoding header, but how I use yaws_zlib:gzip to zip up the
> final rendered html?
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"erlyweb" 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/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to