pagespeed/ngx_pagespeed — pull request #75 by jeffkaufman (2012-11-21 16:23:13+00:00)
Title: options: support in location blocks; fix merging

Previously a command like:

location /pagespeed/ {
pagespeed RewriteLevel CoreFilters
}

would not be allowed because pagespeed was configured at the server-block
level. I've moved all the configuration to the location-block level. This
means that we'll make separate NgxServerContexts and NgeRewriteDriverFactories
for every directory that has configuration data. This may not be a good choice:
if people have a lot of these directories that might use way to much memory.

If this is a problem, an alternate approach would be to use pagespeed "custom
options" at the location-block level but keep the NgxServerContext and
NgeRewriteDriverFactory at the server-block level.

Separately, the merging function was broken, in that it did

child.Merge(parent)

when the semantics we actually need are

child = parent.Clone().Merge(child)