ordering of filters from pagespeed with other filters

13 views
Skip to first unread message

Alex Wu

unread,
Nov 19, 2013, 3:32:43 PM11/19/13
to mod-pagesp...@googlegroups.com
I have downloaded the latest source code from main trunk, and add necessary changes I have. I realized the ordering of pagespeed inplace rewriting filter with my other filter has been reversed. In June beta code, in-place rewriting output filter from pagespeed is called first, and my other one is called after the pagespeed one. With the code from main trunk, my other one is called first, and pagespeed's in-place rewriting filter is called after. I checked code for registering hook/output filers for the all code (main trunk/beta and my other code), they are the same to me. So I am puzzled how this happens?

Alex Wu


Joshua Marantz

unread,
Nov 19, 2013, 5:10:00 PM11/19/13
to mod-pagespeed-discuss
Filter-ordering in Apache is based on an integer position value which is usually picked from a pre-defined constants, and then offset by some arbitrary small number (1,2,3).  The pre-defined constants are in intervals of 10.

If two filters are ordered using the same exact constant, I think it won't be well-defined what the ordering is.  Here's the code to declare the MPS in-place filter.


  ap_register_output_filter(
      kModPagespeedInPlaceFilterName, instaweb_in_place_filter, NULL,
      static_cast<ap_filter_type>(AP_FTYPE_CONTENT_SET - 1));
This block of code has not changed since branch 29 (1.6):


-Josh


On Tue, Nov 19, 2013 at 3:32 PM, Alex Wu <yw9...@gmail.com> wrote:
I have downloaded the latest source code from main trunk, and add necessary changes I have. I realized the ordering of pagespeed inplace rewriting filter with my other filter has been reversed. In June beta code, in-place rewriting output filter from pagespeed is called first, and my other one is called after the pagespeed one. With the code from main trunk, my other one is called first, and pagespeed's in-place rewriting filter is called after. I checked code for registering hook/output filers for the all code (main trunk/beta and my other code), they are the same to me. So I am puzzled how this happens?

Alex Wu


--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mod-pagespeed-discuss/c5bea450-447d-479c-9109-c0a8d036bcf2%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages