scriptText URL returns extra newlines

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Jenkins 2.189

      Between 2.184 and 2.186 it seems to have changed how the /scriptText endpoint returns the data, in 2.186 there are extra newlines at the start of the output which break some of our scripts that use this API to run scripts.

      Running the command

      curl -X POST https://jenkins/scriptText -F 'script=println "hello"'

      produces the following output on 2.184:

      hello 

      but it produces this on on 2.186:

      
          hello

       

      (On our servers we use crumb issuer and auth but for the sake of simplicity I omitted those from the curl command as I think it is probably irrelevant wrt the issue).

       

            Assignee:
            Matt Sicker
            Reporter:
            Istvan Szekeres
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: