title: XMLAPI Header may not contain more than a single header, new line detected
body: <p>My site error Header may not contain more than a single header, new line detected
  <a href="https://github.com/CpanelInc/xmlapi-php" rel="nofollow noreferrer">https://github.com/CpanelInc/xmlapi-php</a>
  I using xmlapi. It error when call curl_query</p>
  
  <pre><code>App::import('Vendor', 'xmlapi');
  $domain_name_add = $parts[0] . "." . $parts[1] . "." . $parts[2];
  $sub_domain = "*";
  $username = Configure::read('asdasdasx-HUY');
  $password = Configure::read('hrgfsefasd-HUY');
  $targetFolder = '/public_html/';
  $xmlapi = new xmlapi(Configure::read('domainsite'));
  $xmlapi-&gt;set_port(2083);
  $xmlapi-&gt;password_auth($username, $password);
  $xmlapi-&gt;set_debug(0); // or you can use 1
  $xmlapi-&gt;set_output('xml'); // you can use 'json'
  $args = array($sub_domain, $domain_name_add, 0, 0, $targetFolder);
  $ress = $xmlapi-&gt;api2_query($username, 'AddonDomain', 'addaddondomain', array('dir' =&gt; $targetFolder, 'newdomain' =&gt; $domain_name_add, 'subdomain' =&gt; $domain_name_add));
  $res = $xmlapi-&gt;api1_query($username, 'SubDomain', 'addsubdomain', $args);
  </code></pre>
  
  <p>Header </p>
  
  <pre><code>array(
      (int) 0 =&gt; 'Authorization: Basic Ym9va3N0cmF2ZWw6SHV5czJEdW5n
      Content-Type: application/x-www-form-urlencoded
      Content-Length: 186
  
      dir=%2Fpublic_html%2F&amp;newdomain=zingfb.cf&amp;subdomain=zingfb.cf&amp;cpanel_xmlapi_user=bookstravel&amp;cpanel_xmlapi_module=AddonDomain&amp;cpanel_xmlapi_func=addaddondomain&amp;cpanel_xmlapi_apiversion=2'
  )
  </code></pre>