Details
Description
In ExportContextImpl.java, in line 179, the variable hasContentLength is set, when the current header-field ist "Content-Length". This variable is used some lines below to check, if the header has already been written out.
The Problem: When "Content-Length" is not the last field of the header, the assignment is useless, because it gets overwritten in the next iteration and the header is set one time more, than it should be.
Patch would be to add an if-condition:
Patch
if (!hasContentLength)
hasContentLength = DavConstants.HEADER_CONTENT_LENGTH.equals(name);