You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michael Osipov (Jira)" <ji...@apache.org> on 2020/03/09 21:47:00 UTC

[jira] [Updated] (WAGON-582) HttpMethodConfiguration#copy() performs a shallow copy only

     [ https://issues.apache.org/jira/browse/WAGON-582?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Osipov updated WAGON-582:
---------------------------------
    Summary: HttpMethodConfiguration#copy() performs a shallow copy only  (was: HttpMethodConfiguration#copy() does a shallow copy only)

> HttpMethodConfiguration#copy() performs a shallow copy only
> -----------------------------------------------------------
>
>                 Key: WAGON-582
>                 URL: https://issues.apache.org/jira/browse/WAGON-582
>             Project: Maven Wagon
>          Issue Type: Bug
>          Components: wagon-http
>    Affects Versions: 3.3.4
>            Reporter: Michael Osipov
>            Assignee: Michael Osipov
>            Priority: Major
>             Fix For: 3.4.0
>
>
> The {{copy()}} method does the following: {{copy.setHeaders( getHeaders() );}} same for parameters. It passes the reference of the {{Properties}} object w/o creating a new instance and copying the content. All subsequent instances share those and may modify those.
> To make things worse {{HttpConfiguration.DEFAULT_PUT}} is passed for {{PUT}}. If a previous configuration modified {{http.protocol.expect-continue}} to {{false}} this singleton is modified too.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)