Uploaded image for project: 'Maven Wagon'
  1. Maven Wagon
  2. WAGON-582

HttpMethodConfiguration#copy() performs a shallow copy only

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.3.4
    • Fix Version/s: 3.4.0
    • Component/s: wagon-http
    • Labels:
      None

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              michael-o Michael Osipov
              Reporter:
              michael-o Michael Osipov
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: