Cocoon
  1. Cocoon
  2. COCOON-1887

Host selector should be case insensitive

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.8, 2.1.11, 2.2
    • Fix Version/s: 2.1.12, 2.2.1
    • Component/s: - Components: Sitemap
    • Labels:
      None
    • Urgency:
      Low
    • Other Info:
      Patch available
    • Affects version (Component):
      Components: Sitemap - 1.0.0
    • Fix version (Component):
      Components: Sitemap

      Description

      According to the relevant RFC (RFC3986 section 3.2.2) the host part of a HTTP URL should be case insensitive; the remaining path is case sensitive, but scheme and host should not be. However, the host selector is currently not case insensitive (since NamedPatternsSelector.checkPatterns(String, String) uses indexOf) and therefore if the requested URL uses a different case for the host part the pipeline may choose the wrong case in the map:select.

        Activity

        Hide
        Andrew Stevens added a comment -
        Patch against 2.1.x branch that adds a unit test for hostname & value being of different cases, and fixes the host selector so that the test passes. The existing behaviour is preserved for any other NamedPatternsSelector subclasses, since they may need to be case-sensitive.
        Show
        Andrew Stevens added a comment - Patch against 2.1.x branch that adds a unit test for hostname & value being of different cases, and fixes the host selector so that the test passes. The existing behaviour is preserved for any other NamedPatternsSelector subclasses, since they may need to be case-sensitive.
        Hide
        Jörg Heinicke added a comment -
        Patch applied to 2.1 and 2.2.
        Show
        Jörg Heinicke added a comment - Patch applied to 2.1 and 2.2.

          People

          • Assignee:
            Jörg Heinicke
            Reporter:
            Andrew Stevens
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development