Uploaded image for project: 'Quarkus'
  1. Quarkus
  2. QUARKUS-2893

Normalize uri template name to be a valid regex groupname

    XMLWordPrintable

Details

    Description

      See https://github.com/quarkusio/quarkus/issues/25258#issuecomment-1113714298 for a description of what is allowed in a uri template.

      These changes add support for `_-.\d` in the component's name.

      Previosly, the component name was directly used as a capture group name.
      The above mentioned characters however are not allowed at some positions in groupnames however.

      Therefore I added a simple normalization, making sure the component name only contains characters in the range `A-Za-z0-9`.

      Also, I added support for spaces in before and after the name, and before and after the regex part.
      The ABNF (see comment above) allows WSP in these cases, which is 0x09 (HTAB) or 0x20 (SPACE). I don't believe however that tabs are that often used inside an `@Path`.

      fixes #25258

      Attachments

        Activity

          People

            Unassigned Unassigned
            probinso_jira Quarkus JIRA Bot
            Rostislav Svoboda Rostislav Svoboda
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: