Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-2691

Apache Felix HTTP service HttpServiceImpl.isNameValid does not match OSGi R4.2 spec?

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • http-2.0.4
    • http-2.2.0
    • HTTP Service
    • None
    • Not relevant

    Description

      Filing bug per:
      http://www.mail-archive.com/dev@felix.apache.org/msg19853.html

      The R4.2 enterprise spec from
      http://www.osgi.org/Download/File?url=/download/r4v42/r4.enterprise.pdf
      on page 48 clearly states:

      The name parameter must also not end with slash ('/') with the
      exception that a name of the form "/" is used to denote the root of
      the bundle.

      The relevant code, in trunk, is, from
      http://svn.apache.org/repos/asf/felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/service/HttpServiceImpl.java

      public void registerResources(String alias, String name, HttpContext context)
      throws NamespaceException
      {
      if (!isNameValid(name))

      { throw new IllegalArgumentException( "Malformed resource name [" + name + "]"); }

      ...

      and

      private boolean isNameValid(String name)
      {
      if (name == null)

      { return false; }

      if (name.endsWith( "/" )) { return false; }

      return true;
      }

      Attachments

        Activity

          People

            fmeschbe Felix Meschberger
            misha680 Misha Koshelev
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 0.5h
                0.5h
                Remaining:
                Remaining Estimate - 0.5h
                0.5h
                Logged:
                Time Spent - Not Specified
                Not Specified