part = &r->headers_in.headers.part;
h = part->elts;
for (i = 0; ; i++) {
if (i >= part->nelts) {
if (part->next == NULL) {
break;
}
part = part->next;
h = part->elts;
i = 0;
}
if (len != h[i].key.len || ngx_strcasecmp(key, h[i].key.data) !=
But this code send empty header(only colon) line to backend.
like this:
:
Should I reconstruct list of headers_in.headers?
Or, should I modify http main module that to avoid sending null header?
Or, Is there any better(faster) way?
On Sat, Mar 17, 2012 at 01:58:14AM +0900, Tsukasa Hamano wrote:
ngx_table_elt_t *h;
part = part->next;
}
Or, Is there any better(faster) way?
You shouldn’t touch r->headers_in at all. It represents headers
got from client, and it’s incorrect to change them.
Instead, to restrict headers passed to backends you should use
functionality provided by relevant backend modules, e.g. with
proxy_pass use
At Fri, 16 Mar 2012 21:32:23 +0400,
Maxim D. wrote:
proxy_pass use
proxy_set_header X-Some-Header "";
I want to modify and unset header based on client request. Apache can
do it. Is there a plan to make something like apr_table_unset()?
I found the following code:
ngx_http_headers_more_rm_header()
I think I have no choise other than this code. but It looks
inefficient and slow.
Perhaps we can give meaning to key.len = 0 is unset flag, because
empty header name is not permitted by RFC.
Thanks for your comment.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.