Can hide_headers_hash in ngx_http_upstream_conf_t be empty?
Maxim Dounin
mdounin at mdounin.ru
Mon Aug 13 15:04:42 UTC 2012
Hello!
On Mon, Aug 13, 2012 at 02:25:24PM +0800, Thomas wrote:
> Hi, all
>
> I'm writing a proxy module which sends http requests to local cache
> server through upstream. It seems that the worker will crush if the
> upstream->conf->hide_headers_hash is empty, following is my gdb stack(nginx
> 1.2.2, Apple Mountain Lion):
[...]
> (gdb) p *hash
> $6 = {
> buckets = 0x0,
> size = 0
> }
>
> I checked ngx_http_proxy_module and it fills the hash with some default
> values, but what should I do if i'm not hiding any response header?
It can be empty, but it must be initialized. In your case it's
not initialized and this is what causes crash.
Maxim Dounin
More information about the nginx-devel
mailing list