André Dörscheln created JCR-3942:
------------------------------------

             Summary: "Content-Length" header maybe set twice
                 Key: JCR-3942
                 URL: https://issues.apache.org/jira/browse/JCR-3942
             Project: Jackrabbit Content Repository
          Issue Type: Bug
          Components: jackrabbit-jcr-server
    Affects Versions: 2.11.3, 2.11.4
         Environment: Windows 10 64Bit, Java build 1.8.0_66-b17
            Reporter: André Dörscheln
            Priority: Minor


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:
{code:title=Patch}
if (!hasContentLength) 
    hasContentLength = DavConstants.HEADER_CONTENT_LENGTH.equals(name);
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to