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

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2.10, 2.3.6
    • Fix Version/s: 2.2.11, 2.3.7
    • Component/s: jackrabbit-spi2dav
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: