1

I have Chinese clients that provide the following in their http request headers:

Accept-Language: zh-cn,zh;q=0.5

This is causing problems with characters being dropped by our load balancer. Is there any way for Apache to rewrite those headers or to override the Accept-Language as:

Accept-Language: en,zh-cn,zh;q=0.5
Zecrates
  • 113
  • 4

1 Answers1

0

I do not think you can rewrite Client headers (not with the mod_xxx I know of) - but you can tailor the URL that's being sent with mod_rewrite - see this page, for instance.

Alien Life Form
  • 2,309
  • 2
  • 21
  • 32
  • 1
    Thanks, but ideally I'd like to only use one URL. The problem is that if the user provides 'zh-cn' as the language the response contains Chinese characters that cannot be handled by the load balancer. For some reason if the user specifies 'en' these characters are automatically converted/dropped. Ideally the application developers should handle those foreign characters, but currently that isn't an option, so I'd like to force Apache to sanitise the response. – Zecrates Feb 07 '12 at 10:44
  • 1
    Uhm. Language negotiation and error handling should allow you to send pretty much any file as response - including one that does not contain chinese characters. That's broken, but so appears to be the load balancer :-) – Alien Life Form Feb 07 '12 at 10:50