getURL & postURL cannot pass "Authorization" key in header map.

getURL & postURL cannot pass "Authorization" key in header map.

This exception has been thoroughly tested. 


Problem :  


The header map variable (passed to getURL & postURL functions) will not permit the inclusion of an "Authorization" key/value pair. 


DS function to HTTP resource : 


  1. map test.passingHeader()
  2. {
  3.     url = "http://webpdi.com/info.php";
  4.     header = { 
  5.               "Authorization" : "Basic dXNlcm5hbWU6cGFzc3dvcmQ=", 
  6.               "header1" : "passed header1!",
  7.               "header2" : "passed header2!", 
  8.               "_Authorization" : "So I can pass \"_Authorization\" but not Authorization?" 
  9.             };


  10.     response = getUrl(url, header,false);
  11.     info header;




  12.     /*RESPONSE LOOKS LIKE THIS


  13.        {responseCode=200, responseText=
  14.            Array (
  15.             [Host] => webpdi.com
  16.             [Connection] => Keep-Alive, TE
  17.             [TE] => trailers, deflate, gzip, compress
  18.             [User-Agent] => RPT-HTTPClient/0.3-3E
  19.             [_Authorization] => So I can pass "_Authorization" but not Authorization?
  20.             [header2] => passed header2!
  21.             [header1] => passed header1!
  22.             [Accept-Encoding] => deflate, gzip, x-gzip, compress, x-compress
  23.           )
  24.        }


  25.     */    


  26.     return response;
  27. }




HTTP resource code (yeah, that's all) : 


  1. <?php
  2. print_r(apache_request_headers());
  3. ?>


Hurl.it test showing the correct response. 


Run HTTP call using Hurl.it