Skip to content

Commit 8ab6573

Browse files
committed
ngx_http_proxy_create_request can be more friendly to the case about
removal of the headers in rewrite handlers #1
1 parent 25c546a commit 8ab6573

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/http/modules/ngx_http_proxy_module.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1383,7 +1383,7 @@ ngx_http_proxy_create_request(ngx_http_request_t *r)
13831383
i = 0;
13841384
}
13851385

1386-
if (ngx_hash_find(&headers->hash, header[i].hash,
1386+
if (header[i].hash == 0 || ngx_hash_find(&headers->hash, header[i].hash,
13871387
header[i].lowcase_key, header[i].key.len))
13881388
{
13891389
continue;
@@ -1519,7 +1519,7 @@ ngx_http_proxy_create_request(ngx_http_request_t *r)
15191519
i = 0;
15201520
}
15211521

1522-
if (ngx_hash_find(&headers->hash, header[i].hash,
1522+
if (header[i].hash == 0 || ngx_hash_find(&headers->hash, header[i].hash,
15231523
header[i].lowcase_key, header[i].key.len))
15241524
{
15251525
continue;

0 commit comments

Comments
 (0)