Thanks, I didn't realize the contexts were cleared. It should be ok to copy the context data correct? e.g. v->data = ngx_pnalloc(r->pool, ctx->addr_text.len); ngx_memcpy(v->data, ctx->addr_text.data, ctx->addr_text.len); Or is it unsafe to reference the context at all in the handler?