Invoking Config.xml through REST returns BOM

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

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Minor
    • Component/s: core
    • Environment:
      Windows Server 2008 R2
      Jenkins v 1.651
      Powershell 3.0

      When invoking the Jenkins rest api for Freestyle jobs, the response began returning a BOM appended to the beginning:
      <?xml version="1.0" encoding="UTF-8"?>

      This is causing malformed XML.
      I know this script was working in my last known jenkins ver : 1.627

      Also, interestingly enough, this seems to only be a problem with freestyle jobs, retrieving the config.xml for my Maven jobs return normal XML data.

      Powershell :

      $url = "http://jenkins:8080/job/JobName/config.xml"
      $cnfg = Invoke-RestMethod -Headers @{Authorization=("Basic {0}" -f $base64AuthInfo)} -Uri $url -method GET
      

            Assignee:
            Unassigned
            Reporter:
            Shawn Cole
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: