Welcome! Log In Create A New Profile

Advanced

Persisting the module request context across internal redirects

January 08, 2015 03:56AM
Hi,

For ngx_pagespeed, I'm looking for a way to persist its module request
context and restore it
even after request processing has been restarted for a named location or
internal redirect.
Keeping a single request context during this process would allow us to
avoid repeating some work we already did earlier, like cache lookups.

For testing, I've achieved this by storing a pointer in the request headers
structure for the request and using that after an internal redirect has
been processed instead of just using ngx_http_get_module_ctx.

This works, but there are lots of reasons why I'd rather prefer not
(ab)using the request headers structure for this.

Is there a better way to keep a reference to the first module request
context in case of internal redirects?
Are there reasons why this could be a bad idea in general?

Kind regards,

Otto
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

Persisting the module request context across internal redirects

oschaaf 1164 January 08, 2015 03:56AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 75
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