Welcome! Log In Create A New Profile

Advanced

adding header/footer to gzip'ed html files

Constantine A. Murenin
April 27, 2013 01:42PM
Hello,

I'm trying to see ways in which OpenGrok could be optimised with nginx.

One of the ideas I have is using nginx to serve the /xref/ pages,
instead of them going through OpenGrok each time. OpenGrok (the
indexer) pre-generates the body of the /xref/ pages, and stores the
resulting html as .gz files, but those files don't have any
header/footer, and require to be presented within "<pre>" and "</pre>",
which OpenGrok (the webapp) then adds on the fly.

Would it be possible to use `add_before_body` and `add_after_body`
(http://nginx.org/docs/http/ngx_http_addition_module.html), together
with `gzip_static always`
(http://nginx.org/docs/http/ngx_http_gzip_static_module.html), together
with `gunzip on`
(http://nginx.org/docs/http/ngx_http_gunzip_module.html), to replace
passing /xref/ to OpenGrok (the webapp)?

Technically, gzip / deflate is a stream encoding, so, supposedly,
there'd be no need to decode and re-encode the .gz files, but some
special handling will probably still have to be performed nonetheless.

I presume a scenario as above would not currently work (but I might as
well be wrong); however, does this sound like something that's
potentially interesting, and not overly difficult and complicated to fix
up? Or would it be simpler to amend all the /xref/ pages for all of
them to redundantly include the needed header and footer?

Cheers,
Constantine.

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

adding header/footer to gzip'ed html files

Constantine A. Murenin April 27, 2013 01:42PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 146
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready