<html><head><base href="x-msg://2362/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Could you open a bug on <a href="http://jira.freeswitch.org">jira.freeswitch.org</a> as a feature request to make this a configurable param. (patches that do it even better) <div><br></div><div>Mike</div><div><br><div><div>On Oct 6, 2009, at 12:55 PM, Christian Damianidis wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div lang="EN-US" link="blue" vlink="purple"><div class="Section1"><div style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0in; margin-bottom: 0.0001pt; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">I’ve tested this and making the change from ANY to BASIC worked. Thanks for the help.<o:p></o:p></span></div><div style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0in; margin-bottom: 0.0001pt; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">It no longer sends the initial post without auth.<o:p></o:p></span></div><div style="border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-top-style: solid; border-top-color: rgb(181, 196, 223); border-top-width: 1pt; padding-top: 3pt; padding-right: 0in; padding-bottom: 0in; padding-left: 0in; "><div style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0in; margin-bottom: 0.0001pt; "><b><span style="font-size: 10pt; font-family: Tahoma, sans-serif; ">From:</span></b><span style="font-size: 10pt; font-family: Tahoma, sans-serif; "><span class="Apple-converted-space"> </span>Anthony Minessale [mailto:anthony.minessale@gmail.com]<span class="Apple-converted-space"> </span><br><b>Sent:</b><span class="Apple-converted-space"> </span>Tuesday, October 06, 2009 11:02 AM<br><b>To:</b><span class="Apple-converted-space"> </span><a href="mailto:freeswitch-users@lists.freeswitch.org" style="color: blue; text-decoration: underline; ">freeswitch-users@lists.freeswitch.org</a><br><b>Subject:</b><span class="Apple-converted-space"> </span>Re: [Freeswitch-users] mod_xml_curl http POST is inconsistent/bug<o:p></o:p></span></div></div><div style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0in; margin-bottom: 0.0001pt; "><o:p> </o:p></div><div style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0in; margin-bottom: 0.0001pt; ">My guess is that we configure the curl to support the full range of http auth methods.<br>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.<br><br>Here is a snippet from the libcurl api docs:<br>-------------------------------------------------------------------------------------------------------------------------------------------------------------<o:p></o:p></div><p class="level0" style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; ">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:<o:p></o:p></p><p class="level0" style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; "> curl_easy_setopt(easyhandle, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST|CURLAUTH_BASIC);<o:p></o:p></p><p class="MsoNormal" style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0in; margin-bottom: 12pt; ">-------------------------------------------------------------------------------------------------------------------------------------------------------------<br><br>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.<br><br>edit: /usr/src/freeswitch.trunk/src/mod/xml_int/mod_xml_curl/mod_xml_curl.c line 220<br>change<br><br>curl_easy_setopt(curl_handle, CURLOPT_HTTPAUTH, CURLAUTH_ANY);<br><br>to<br><br>curl_easy_setopt(curl_handle, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);<br><br><br>If this works i'll think about exposing the auth methods so you can choose them in the config.<br><br><o:p></o:p></p><div><div style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0in; margin-bottom: 0.0001pt; "><span class="Apple-style-span" style="color: rgb(31, 73, 125); font-size: 15px; "> </span></div></div></div></div></span></blockquote></div></div></body></html>