Requests icon indicating copy to clipboard operation
Requests copied to clipboard

Basic auth not working for multiple requests

Open ahansson89 opened this issue 8 years ago • 2 comments

ahansson89 avatar May 10 '16 01:05 ahansson89

Related - #242

ramesh-tr avatar Sep 28 '16 17:09 ramesh-tr

This is caused by the Requests_Auth_Basic::register method only hooking into curl.before_send and not curl.before_multi_add ( the first is not called by request_multiple ).

refs:

https://github.com/rmccue/Requests/blob/master/library/Requests/Auth/Basic.php#L56

https://github.com/rmccue/Requests/blob/master/library/Requests/Transport/cURL.php#L208

So we have either of two solutions, and I'm unsure which is best:

  1. Call curl.before_send within Requests_Transport_cURL::request_multiple
  2. Register a hook to curl.before_multi_add in Requests_Auth_Basic::register

shadyvb avatar Mar 14 '19 12:03 shadyvb