Hi,
Thank you,
I got this point.
But in my case i need to set cookie value in header later read from header
the same value.
Is any example which i can follow for my requirement, can you suggest
please.
Regards,
Pankaj
On Wed, Apr 27, 2016 at 9:08 PM, Valentin V. Bartenev <vbart@nginx.com>
wrote:
> On Wednesday 27 April 2016 13:26:47 Pankaj Chaudhary wrote:
> > Hi Bart,
> >
> > thank you for response.
> >
> > I have referred the /root/Downloads/nginx-1.9.14/src/http/v2 module code.
> >
> > Below is that sample code.
> > static ngx_int_t
> > ngx_http_v2_parse_authority(ngx_http_request_t *r, ngx_http_v2_header_t
> > *header)
> > {
> > ngx_table_elt_t *h;
> > ngx_http_header_t *hh;
> > ngx_http_core_main_conf_t *cmcf;
> >
> > static ngx_str_t host = ngx_string("host");
> >
> > h = ngx_list_push(&r->headers_in.headers);
> > if (h == NULL) {
> > return NGX_ERROR;
> > }
> >
> > h->hash = ngx_hash_key(host.data, host.len);
> >
> > h->key.len = host.len;
> > h->key.data = host.data;
> >
> > h->value.len = header->value.len;
> > h->value.data = header->value.data;
> >
> > h->lowcase_key = host.data;
> >
> > cmcf = ngx_http_get_module_main_conf(r, ngx_http_core_module);
> >
> > hh = ngx_hash_find(&cmcf->headers_in_hash, h->hash,
> > h->lowcase_key, h->key.len);
> [..]
>
> This code does what it supposed to do. It adds a parsed "host" header
> to the input headers list, and then it tries to find and call appropriate
> handler (the ngx_http_process_host() function in this particular case).
>
> wbr, Valentin V. Bartenev
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx