(52) Empty reply from server

Pankaj Chaudhary pankajitbhu at gmail.com
Thu Apr 14 10:04:40 UTC 2016

Hi All,

i am trying to set value in header with the help of below code snippet .

ngx_table_elt_t *h1;
  h1 = ngx_list_push(&r->headers_out.headers);
  h1->hash = 1;
  ngx_str_set(&h1->key, "http_user_agent");
  ngx_str_set(&h1->value, "user_agent_value");

if i try to retrieve 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_t    name = ngx_string("http_user_agent");
clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
hash = ngx_hash_key_lc(name.data, name.len);
type = ngx_hash_find(&clcf->types_hash, hash, name.data, name.len);

Can anyone help me to fix this problem.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20160414/aa1138a2/attachment.html>

More information about the nginx mailing list