[sr-dev] [kamailio] module http_client - support for preemptive authentication (#515)

filiplx notifications at github.com
Fri Feb 19 16:16:49 CET 2016


It would be nice if it was possible to configure the module to use preemptive authentication.

I forked the module to add it myself in a primitive way since I needed it only for Basic Authentication, but it would be better to have it configurable.

In functions.h

// Before:
res |= curl_easy_setopt(curl, CURLOPT_HTTPAUTH, (CURLAUTH_DIGEST|CURLAUTH_BASIC));
// After:
res |= curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);



From: https://curl.haxx.se/libcurl/c/CURLOPT_HTTPAUTH.html

"If more than one bit is set, libcurl will first query the site to see which authentication methods it supports and then pick the best one you allow it to use. For some methods, this will induce an extra network round-trip" <===== this is what I needed to avoid

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/515
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20160219/1be3009e/attachment.html>


More information about the sr-dev mailing list