roxen.lists.roxen.general

Subject Author Date
Re: [PATCH 14/17] New module: gzip-on-the-fly Henrik_Grubbström <grubba[at]roxen[dot]com> 21-01-2009
On Tue, 20 Jan 2009, Stephen R. van den Berg wrote:

> Arjan van Staalduijnen wrote:
>> For proper protocol cache support it should have a:
>
>>        id->register_vary_callback("accept-encoding",
accept_encoding_callback);
>
>> ...early in the code. That way the module can handle both types of browsers
(gzip-supporting and non-supporting) even while protocol caching is enabled.
>
> Erm, I'm not sure where to register them (never used those callbacks).

You register them at the point you perform the check. eg:

   id->register_vary_callback("foo-header", check_valid_foo_header);
   if (check_valid_foo_header(url, id)) {
     // Do something.
   } else {
     // Do something else.
   }

> Do I need to make the module a MODULE_FIRST|MODULE_FILTER?
> And then register that callback in the first_try()?

No, see above.

> -- 
> Sincerely,
>           Stephen R. van den Berg.

--
Henrik Grubbström					<grubba[at]roxen.com>
Roxen Internet Software AB