mirror of
https://github.com/nginx/nginx.git
synced 2025-06-12 21:52:41 +08:00
do not add header if add_header ""
This commit is contained in:
parent
4f395dec87
commit
2194e75bb3
@ -325,14 +325,16 @@ ngx_http_add_header(ngx_http_request_t *r, ngx_http_header_val_t *hv,
|
|||||||
{
|
{
|
||||||
ngx_table_elt_t *h;
|
ngx_table_elt_t *h;
|
||||||
|
|
||||||
h = ngx_list_push(&r->headers_out.headers);
|
if (value->len) {
|
||||||
if (h == NULL) {
|
h = ngx_list_push(&r->headers_out.headers);
|
||||||
return NGX_ERROR;
|
if (h == NULL) {
|
||||||
}
|
return NGX_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
h->hash = hv->value.hash;
|
h->hash = hv->value.hash;
|
||||||
h->key = hv->value.key;
|
h->key = hv->value.key;
|
||||||
h->value = *value;
|
h->value = *value;
|
||||||
|
}
|
||||||
|
|
||||||
return NGX_OK;
|
return NGX_OK;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user