NPE in spi2dav when server does not send all headers
----------------------------------------------------
Key: JCR-3210
URL: https://issues.apache.org/jira/browse/JCR-3210
Project: Jackrabbit Content Repository
Issue Type: Bug
Components: jackrabbit-spi2dav
Affects Versions: 2.3.5
Reporter: Tobias Bocanegra
Priority: Minor
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});
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira