Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-5701

HttpCollector doesn't detect response locale (PATCH INCLUDED)

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 1.10.7
    • 1.10.8
    • Data Collection - HTTP
    • Security Level: Default (Default Security Scheme)
    • None
    • Debian 6.0 adm64

    Description

      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

      Attachments

        Activity

          People

            ranger Benjamin Reed
            stcyr Cyrille Bollu
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: