Welcome! Log In Create A New Profile

Advanced

Re: (52) Empty reply from server

All files from this thread

File Name File Size   Posted by Date  
image.png 122.1 KB open | download pankajitbhu 05/02/2016 Read message
April 20, 2016 03:26AM
>>But your code snippet does not match exactly the types and return values
>>of that example. I don't know if that is something worth investigating.

I have tried to change match exactly the types and return values
of that example. but below is response curl: (52) Empty reply from server

>>Also, you may be able to make use of #3: "Blazing fast" instead.

but same response

>>And one final thing - I suspect that the request header "Cookie" will
>>be presented in the header_in structure under the name "cookie", not
>>the name "http_cookie". Possibly just making that change will cause your
>>code to find the value you want.

Tried to use the same now i am getting response only one word "cookie"
I have used below example to set custom header

ngx_int_tset_custom_header_in_headers_out(ngx_http_request_t *r,
ngx_str_t *key, ngx_str_t *value) {
ngx_table_elt_t *h;

/* All we have to do is just to allocate the header... */
h = ngx_list_push(&r->headers_out.headers);
if (h == NULL) {
return NGX_ERROR;
}

/* ... setup the header key ... */
h->key = *key;

/* ... and the value. */
h->value = *value;

/* Mark the header as not deleted. */
h->hash = 1;

return NGX_OK;}

below is "curl -i" response

HTTP/1.1 200 OK
Server: nginx/1.9.12
Date: Wed, 20 Apr 2016 15:25:20 GMT
Content-Type: text/plain
Content-Length: 14
Connection: keep-alive
cookie: thisitestvalue
user_agent: 10.9 user
get-rese: Cookie


On Tue, Apr 19, 2016 at 11:12 PM, Francis Daly <francis@daoine.org> wrote:

> On Tue, Apr 19, 2016 at 03:51:17PM +0530, Pankaj Chaudhary wrote:
>
> Hi there,
>
> > i am trying to search for one header with the specified name
> >
> > i am not able to get header value .
>
>
> https://www.nginx.com/resources/wiki/start/topics/examples/headers_management/
> lists four ways to try this. You are using something like #2: "Quick
> search".
>
> But your code snippet does not match exactly the types and return values
> of that example. I don't know if that is something worth investigating.
>
> Also, you may be able to make use of #3: "Blazing fast" instead.
>
> > ngx_str_t val = ngx_string("http_cookie");
>
> And one final thing - I suspect that the request header "Cookie" will
> be presented in the header_in structure under the name "cookie", not
> the name "http_cookie". Possibly just making that change will cause your
> code to find the value you want.
>
> Good luck with it,
>
> f
> --
> Francis Daly francis@daoine.org
>
> _______________________________________________
> 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
Subject Author Posted

(52) Empty reply from server

Pankaj Chaudhary April 14, 2016 06:06AM

Re: (52) Empty reply from server

Francis Daly April 14, 2016 12:56PM

Re: (52) Empty reply from server

pankajitbhu April 14, 2016 02:08PM

Re: (52) Empty reply from server

Francis Daly April 14, 2016 05:14PM

Re: (52) Empty reply from server

pankajitbhu April 15, 2016 03:50AM

Re: (52) Empty reply from server

pankajitbhu April 18, 2016 06:56AM

Re: (52) Empty reply from server

Francis Daly April 18, 2016 07:36PM

Re: (52) Empty reply from server

pankajitbhu April 19, 2016 06:22AM

Re: (52) Empty reply from server

Francis Daly April 19, 2016 01:44PM

Re: (52) Empty reply from server

pankajitbhu April 20, 2016 03:26AM

Re: (52) Empty reply from server

Francis Daly April 20, 2016 03:40PM

Re: (52) Empty reply from server

pankajitbhu April 21, 2016 03:36AM

Re: (52) Empty reply from server

Francis Daly April 22, 2016 02:54PM

Re: (52) Empty reply from server

pankajitbhu April 26, 2016 07:24AM

Re: (52) Empty reply from server

Valentin V. Bartenev April 26, 2016 08:54AM

Re: (52) Empty reply from server

pankajitbhu April 27, 2016 03:58AM

Re: (52) Empty reply from server

Valentin V. Bartenev April 27, 2016 11:40AM

Re: (52) Empty reply from server

pankajitbhu April 27, 2016 12:22PM

Re: (52) Empty reply from server

Valentin V. Bartenev May 04, 2016 09:48AM

Re: (52) Empty reply from server

pankajitbhu May 05, 2016 01:00AM

Re: (52) Empty reply from server

Valentin V. Bartenev May 05, 2016 10:04AM

Re: (52) Empty reply from server

pankajitbhu May 09, 2016 05:06AM

Re: (52) Empty reply from server

Francis Daly May 10, 2016 04:48PM

Re: (52) Empty reply from server

pankajitbhu May 11, 2016 02:50AM

Re: (52) Empty reply from server

Francis Daly April 28, 2016 03:12AM

Re: (52) Empty reply from server Attachments

pankajitbhu May 02, 2016 03:14AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 133
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready