<div dir="ltr"><div>Hi,<br></div><div><br></div><div>For ngx_pagespeed, I'm looking for a way to persist its module request context and restore it</div><div>even after request processing has been restarted for a named location or internal redirect.</div><div>Keeping a single request context during this process  would allow us to avoid repeating some work we already did earlier, like cache lookups.</div><div><br></div><div>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.</div><div><br></div><div>This works, but there are lots of reasons why I'd rather prefer not (ab)using the request headers structure for this.</div><div><br></div><div>Is there a better way to keep a reference to the first module request context in case of internal redirects? </div><div>Are there reasons why this could be a bad idea in general?</div><div><br></div><div>Kind regards,</div><div><br></div><div>Otto</div></div>