Opened 12 years ago
Closed 12 years ago
#492 closed defect (worksforme)
location-specific charset not respected
| Reported by: | Lorenzo Raffio | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | |
| Component: | nginx-core | Version: | 1.5.x |
| Keywords: | Cc: | ||
| uname -a: | |||
| nginx -V: | 1.5.8 | ||
Description
Is it intended that
location /somelocation {
index index.htm;
charset windows-1251;
}
..isn't respected? charset outside location (in server block) works.
Note:
See TracTickets
for help on using tickets.

I've just tested with the configuration below:
events {} http { default_type application/octet-stream; include conf/mime.types; server { location /index { index index.htm; charset windows-1251; } } }and it seems all works as expected:
I suspect your problem is not with the
charsetdirective but with configuration, where requests actually are handled by another location. Please note, that every request is handled by only one location block.You can check the documentation:
and ask further questions in mailing list: http://mailman.nginx.org/mailman/listinfo/nginx