More_set_headers with content-type "text/html" does not send header

Hi,

I’m using nginx (1.3.6 +spdy52) with agentzh/headers-more-nginx-module
(current master branch from git). There’s a Content-Type header sent
which does contain the following: text/html; charset=utf-8

However when I add more_set_headers -t "text/html" "X-UA-Compatible:IE=Edge,chrome=1" to my server block this header
isn’t sent. In case I remove that -t "text/html" it’s all fine
(read: header is sent). Tried with -t "text/html; charset=utf-8" too
without any effect.

Any ideas what might be wrong here?

Regards,
Christian

Hello

I have a map to match my clients but somehow i can not limit the chars
within the regular expression.

What i want to archive is the following map with a general regular
expression:
map $uri $myclient {
default noclient;
~/de/? de;
~/es/? es;
~/nl/? nl;
# 1…n (always 2 chars long)
}

But when i try it this way:

map $uri $myclient {
default noclient;
~/(?[a-z]{2})/ $suffix;
}

i get the following error:
nginx: [emerg] invalid number of the map parameters www.vm:17

This one works but i get even hits if i have more then 2 chars what is
not desired behaviour.

map $uri $myclient {
default noclient;
~/(?[a-z])/ $suffix;
}

Any ideas? Thank you!

Regards Frank

On Friday 14 September 2012 13:21:06 Frank Ruske wrote:
[…]

But when i try it this way:

map $uri $myclient {
default noclient;
~/(?[a-z]{2})/ $suffix;
}

i get the following error:
nginx: [emerg] invalid number of the map parameters www.vm:17

[…]

Any ideas? Thank you!

If a regular expression includes the characters “}” or “;”, the whole
expressions should be enclosed in single or double quotes.

wbr, Valentin V. Bartenev


http://nginx.org/en/donation.html

Thank you. Did not saw that in the docs. My fault

Regards Frank


Von: [email protected] [[email protected]] im Auftrag von
Valentin V. Bartenev [[email protected]]
Gesendet: Freitag, 14. September 2012 12:58
An: [email protected]
Betreff: Re: Map using regular expresion limited to {2} chars

On Friday 14 September 2012 13:21:06 Frank Ruske wrote:
[…]

But when i try it this way:

map $uri $myclient {
default noclient;
~/(?[a-z]{2})/ $suffix;
}

i get the following error:
nginx: [emerg] invalid number of the map parameters www.vm:17

[…]

Any ideas? Thank you!

If a regular expression includes the characters } or ;, the whole
expressions should be enclosed in single or double quotes.

wbr, Valentin V. Bartenev


http://nginx.org/en/donation.html


nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx