Issue #342 resolved

sonia.scm.net.HttpRequest.appendValues() adds parameter values twice

Taneli Korri
created an issue

When you're adding a new parameter to a HttpRequest instance the initial values gets added twice in the appendValues() method. The method creates a new list with the values on line 345 and it also adds the values to the same list the second time on line 351.

At least in my case this bug also breaks the scm-jenkins-plugin. Since now when there are two values for the same parameter, the body of the request sent to Jenkins contains "token=MYTOKENtoken=MYTOKEN" which Jenkins doesn't understand.

I've attached a patch which removes the first insert. This also fixes the scm-jenkins-plugin for me.

Comments (2)

  1. Log in to comment