Re: (52) Empty reply from server on slow response

2016-06-23 Thread Maxim Dounin
Hello! On Thu, Jun 23, 2016 at 08:02:11AM -0400, ktiniatros wrote: > I have a node.js/express backend with nginx. Everything works fine except > one request which gives back (52) Empty reply from server on slow responses > ONLY (this request aggregates remote data, so in some very

(52) Empty reply from server on slow response

2016-06-23 Thread ktiniatros
Hi, I have a node.js/express backend with nginx. Everything works fine except one request which gives back (52) Empty reply from server on slow responses ONLY (this request aggregates remote data, so in some very specific scenarios it takes time to complete). By slow, I mean specifically when

Re: (52) Empty reply from server

2016-05-11 Thread Pankaj Chaudhary
>You can read the headers_in data structure, and write the headers_out >data structure, as the examples show. I was able to write in headers_out data structure as i have shown my code already but i was not able to read from headers_in structure that is problem i am facing. I am looking solution

Re: (52) Empty reply from server

2016-05-10 Thread Francis Daly
On Mon, May 09, 2016 at 02:34:13PM +0530, Pankaj Chaudhary wrote: Hi there, > Its means nginx do not have any API as other server having to set header > and get header ? very strange ... You are correct. You've already shown code where you read headers sent by the client, and write headers

Re: (52) Empty reply from server

2016-05-09 Thread Pankaj Chaudhary
Hi, Its means nginx do not have any API as other server having to set header and get header ? very strange ... I need to write my own module to read and write cookies values? My module is in written in C programming language. On Thu, May 5, 2016 at 7:32 PM, Valentin V. Bartenev

Re: (52) Empty reply from server

2016-05-05 Thread Valentin V. Bartenev
On Thursday 05 May 2016 10:27:46 Pankaj Chaudhary wrote: > Hi, > > thank you! > My module is basically for resource protection. > I have already running my module on other servers also. > My module follow below steps. > -Generate cookie and write in response header > -read from header when

Re: (52) Empty reply from server

2016-05-04 Thread Pankaj Chaudhary
Hi, thank you! My module is basically for resource protection. I have already running my module on other servers also. My module follow below steps. -Generate cookie and write in response header -read from header when cookie is needed IIS have API setheader() to set header and getheader() to

Re: (52) Empty reply from server

2016-05-04 Thread Valentin V. Bartenev
On Wednesday 27 April 2016 21:51:33 Pankaj Chaudhary wrote: > 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. > I believe there

Re: (52) Empty reply from server

2016-04-28 Thread Francis Daly
On Tue, Apr 26, 2016 at 04:52:22PM +0530, Pankaj Chaudhary wrote: Hi there, > I have requirement to create own cookie based on input and wirte the that > cookie in header. > whenever i need that i can read from header and use it. I confess that I do not understand what that requirement

Re: (52) Empty reply from server

2016-04-27 Thread Pankaj Chaudhary
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 wrote:

Re: (52) Empty reply from server

2016-04-27 Thread Valentin V. Bartenev
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,

Re: (52) Empty reply from server

2016-04-22 Thread Francis Daly
On Thu, Apr 21, 2016 at 01:04:40PM +0530, Pankaj Chaudhary wrote: Hi there, > yes i am able to write successfully but while reading i am not getting the > my written value in header. > > for Example from my source code:-I am writing "thisitestvalue" value > against key "Set-Cookie" but if

Re: (52) Empty reply from server

2016-04-21 Thread Pankaj Chaudhary
> > >>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 > > > ngx_int_tset_custom_header_in_

Re: (52) Empty reply from server

2016-04-20 Thread Francis Daly
tly the types and return values > of that example. but below is response curl: (52) Empty reply from server > ngx_int_tset_custom_header_in_headers_out(ngx_http_request_t *r, > ngx_str_t *key, ngx_str_t *value) { The code snippet you show seems to relate to writing your own http header

Re: (52) Empty reply from server

2016-04-20 Thread Pankaj Chaudhary
>>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 se

Re: (52) Empty reply from server

2016-04-19 Thread Francis Daly
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

Re: (52) Empty reply from server

2016-04-19 Thread Pankaj Chaudhary
Hi all, i am trying to search for one header with the specified name i am not able to get header value . below my code snippet. ngx_http_core_main_conf_t *clcf; ngx_str_t *type; ngx_uint_t hash; ngx_str_tval = ngx_string("http_cookie"); clcf =

Re: (52) Empty reply from server

2016-04-18 Thread Francis Daly
On Mon, Apr 18, 2016 at 04:25:24PM +0530, Pankaj Chaudhary wrote: Hi there, > not able to read header value after setting... > > any help most welcome You have your nginx "hello world" module, yes? You can show your config and your "curl -i" request and response with your module's output,

Re: (52) Empty reply from server

2016-04-18 Thread Pankaj Chaudhary
not able to read header value after setting... any help most welcome On Fri, Apr 15, 2016 at 1:17 PM, Pankaj Chaudhary wrote: > Hi Francis, > > thank you! > > i have checked Emillers guide but i am not able to use the same for my > problem. > > I have my product in c

Re: (52) Empty reply from server

2016-04-15 Thread Pankaj Chaudhary
Hi Francis, thank you! i have checked Emillers guide but i am not able to use the same for my problem. I have my product in c and currently running on Apache and now i have to move this product on nginx. In Apache apr_table_set() can use set value to header and later that value can read from

Re: (52) Empty reply from server

2016-04-14 Thread Francis Daly
On Thu, Apr 14, 2016 at 11:36:52PM +0530, Pankaj Chaudhary wrote: Hi there, > Actually I have requirement to add value to header and then read same value > like cookies values,URL. > Is any API which I can use for the same. The referenced guides are probably the best starting points. It sounds

Re: (52) Empty reply from server

2016-04-14 Thread Pankaj Chaudhary
, knowing that the basic starting point does work for you. > > > ngx_table_elt_t *h1; > > h1 = ngx_list_push(>headers_out.headers); > > h1->hash = 1; > > ngx_str_set(>key, "http_user_agent"); > > ngx_str_set(>value, "user_agent_va

Re: (52) Empty reply from server

2016-04-14 Thread Francis Daly
k for you. > ngx_table_elt_t *h1; > h1 = ngx_list_push(>headers_out.headers); > h1->hash = 1; > ngx_str_set(>key, "http_user_agent"); > ngx_str_set(>value, "user_agent_value"); > > if i try to retrieve the same value then getti

(52) Empty reply from server

2016-04-14 Thread Pankaj Chaudhary
ieve the same value then getting response "(52) Empty reply from server" ngx_http_core_loc_conf_t *clcf; ngx_str_t *type; ngx_uint_t hash; ngx_str_tname = ngx_string("http_user_agent"); clcf = ngx_http_get_module_loc_c