-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.10.7
-
Fix Version/s: 1.10.8
-
Component/s: Data Collection - HTTP
-
Security Level: Default (Default Security Scheme)
-
Labels:None
-
Environment:Debian 6.0 adm64
Hi,
In issue NMS-5426, Benjamin created a fix to better handle locale in HTTP data collection.
His fix tries to parse the HTTP data with the following locale (in order):
1- The HTTP response's locale
2- OpenNMS' system locale
3- Locale.ENGLISH
However his patch isn't quite correct; To devise the HTTP response's locale, he uses the getLocale() method which is only intended to be used by the server when generating a HTTP response.
After some research, it seems that the only way to devise an HTTP response's locale is by looking for a "Content-Language" HTTP header (RFC2616).... Well, it's also possible to have locale information in <meta> tags, but let's keep that out of the discussion for now...
I've written a small patch to let HttpCollector do this if you like.
Best regards,
Cyrille
pwf