[Freeswitch-users] mod_xml_curl http POST is inconsistent/bug

Anthony Minessale anthony.minessale at gmail.com
Tue Oct 6 08:01:46 PDT 2009


My guess is that we configure the curl to support the full range of http
auth methods.
Some of them like Digest require a challenge and realm etc so it's probably
asking without auth header because it cannot create one until it gets that
data.  In the case of Basic you can send the login and pass right away but
it does not know in advance that it will be basic.

Here is a snippet from the libcurl api docs:
-------------------------------------------------------------------------------------------------------------------------------------------------------------

Both these options allow you to set multiple types (by ORing them together),
to make libcurl pick the most secure one out of the types the server/proxy
claims to support. This method does however add a round-trip since libcurl
must first ask the server what it supports:

 curl_easy_setopt(easyhandle, CURLOPT_HTTPAUTH,
 CURLAUTH_DIGEST|CURLAUTH_BASIC);
-------------------------------------------------------------------------------------------------------------------------------------------------------------

So my guess is that if we set it to only support basic, then it would work
how you expect so if you want to test it for me I can make it into a
parameter.

edit: /usr/src/freeswitch.trunk/src/mod/xml_int/mod_xml_curl/mod_xml_curl.c
line 220
change

curl_easy_setopt(curl_handle, CURLOPT_HTTPAUTH, CURLAUTH_ANY);

to

curl_easy_setopt(curl_handle, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);


If this works i'll think about exposing the auth methods so you can choose
them in the config.


On Tue, Oct 6, 2009 at 9:39 AM, Christian Damianidis <
ChristianDamianidis at globalive.com> wrote:

>  This web request goes to a server running IIS on Windows Server 2003.
>
>
>
> *From:* Brian West [mailto:brian at freeswitch.org]
> *Sent:* Monday, October 05, 2009 5:43 PM
> *To:* freeswitch-users at lists.freeswitch.org
> *Subject:* Re: [Freeswitch-users] mod_xml_curl http POST is
> inconsistent/bug
>
>
>
> Are you using something other than apache?
>
>
>
> /b
>
>
>
> On Oct 5, 2009, at 1:25 PM, Christian Damianidis wrote:
>
>
>
>
>
> The inconsistent POST request sent by the module causes freeswitch to hang
> for 1-2 minutes during start-up.
>
>
>
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>


-- 
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
Twitter: http://twitter.com/FreeSWITCH_wire

AIM: anthm
MSN:anthony_minessale at hotmail.com <MSN%3Aanthony_minessale at hotmail.com>
GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com<PAYPAL%3Aanthony.minessale at gmail.com>
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888 at conference.freeswitch.org <sip%3A888 at conference.freeswitch.org>
iax:guest at conference.freeswitch.org/888
googletalk:conf+888 at conference.freeswitch.org<googletalk%3Aconf%2B888 at conference.freeswitch.org>
pstn:213-799-1400
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20091006/de4d0acc/attachment-0002.html 


More information about the FreeSWITCH-users mailing list