[ https://issues.apache.org/jira/browse/JCR-3942?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Julian Reschke updated JCR-3942: -------------------------------- Fix Version/s: 2.16.7 > Content-Length header field may be 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.13.0 > Environment: Windows 10 64Bit, Java build 1.8.0_66-b17 > Reporter: André Dörscheln > Assignee: Julian Reschke > Priority: Minor > Labels: candidate_jcr_2_16, easyfix, patch, performance > Fix For: 2.20.1, 2.22, 2.21.1, 2.18.6, 2.16.7 > > Original Estimate: 1m > Remaining Estimate: 1m > > 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 (v8.3.4#803005)