Uploaded image for project: 'Jackrabbit Content Repository'
  1. Jackrabbit Content Repository
  2. JCR-3210

NPE in spi2dav when server does not send all headers

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.2.10, 2.3.6
    • 2.2.11, 2.3.7
    • jackrabbit-spi2dav
    • None

    Description

      The ValueLoader may throw a NPE if the desired headers are not present in the response:

      org.apache.jackrabbit.spi2davex.ValueLoader:

      public Map<String, String> loadHeaders(String uri, String[] headerNames) throws IOException, RepositoryException {
      ....
      for (String name : headerNames)

      { ---> headers.put(name, method.getResponseHeader(name).getValue()); }

      .....
      }

      In my case, the server does not return the ETag response header, but the 'loadHeaders' is indirectly called by the QValueFactoryImpl:

      this.preInitialize(new String[]

      {HEADER_ETAG, HEADER_LAST_MODIFIED}

      );

      Attachments

        Activity

          People

            tripod Tobias Bocanegra
            tripod Tobias Bocanegra
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: