[ 
https://issues.apache.org/jira/browse/JCR-3942?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17104421#comment-17104421
 ] 

Julian Reschke edited comment on JCR-3942 at 2/8/21, 9:45 AM:
--------------------------------------------------------------

trunk: (2.21.1) [r1877355|http://svn.apache.org/r1877355]
2.20: (2.20.1) [r1877581|http://svn.apache.org/r1877581]
2.16: (2.16.7) [r1881130|http://svn.apache.org/r1881130]
2.14: [r1886309|http://svn.apache.org/r1886309]

...in retired branches:
2.18: (2.18.6) [r1878578|http://svn.apache.org/r1878578]



was (Author: reschke):
trunk: (2.21.1) [r1877355|http://svn.apache.org/r1877355]
2.20: (2.20.1) [r1877581|http://svn.apache.org/r1877581]
2.18: (2.18.6) [r1878578|http://svn.apache.org/r1878578]
2.16: [r1881130|http://svn.apache.org/r1881130]

> 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: cand, candidate_jcr_2_12, easyfix, patch, performance
>             Fix For: 2.14.9, 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)

Reply via email to