Bug Report #3830
Request_Client_External cURL driver does not set headers (3.1/develop)
|Assignee:||Sam de Freyssinet||% Done:|
Request_Client_External does not properly set request headers when using _curl_execute driver.
#1 Updated by Mike Matz about 3 years ago
#5 Updated by Jeremy Bush about 3 years ago
I don't see how it's unpredictable. You set known headers in the request (easily done in a unit test provider), and you need to be able to verify that they will be sent in the request. It probably involves a change in the internal API, but every change needs to be tested.
#6 Updated by Mike Matz about 3 years ago
Unit testing is possible but would involve mocking the cURL library itself, which has a procedural API. An easier solution might be to actually run full cURL requests against a preconfigured local URL that simply spits the contents of the request back to the client; that could be used to test each of the HTTP request mechanisms (http, curl and native) but seems a little sloppy and requires that "sounding board" URL be active when tests are running. I'm not too familiar with the current test suite but I'm guessing it's not ideal to depend on a local web server being configured properly and/or network access being available in order to complete the tests?