curl-library
Re: CURLAUTH_ANY Hangs on CURLOPT_PUT
Date: Thu, 10 Jun 2004 12:06:41 -0500
"Gisle Vanem" <gvanem_at_broadpark.no> said:
>>wxString szFullURL = m_szBaseURL + szRemoteFile;
>>
>>m_szResponseHeader = wxEmptyString;
>>m_szResponseBody = wxEmptyString;
>>
>>curl_easy_setopt(m_pCURL, CURLOPT_URL, szFullURL);
>>curl_easy_setopt(m_pCURL, CURLOPT_HEADERFUNCTION, wxcurldav_header_func);
>>curl_easy_setopt(m_pCURL, CURLOPT_WRITEHEADER, &m_szResponseHeader);
>>curl_easy_setopt(m_pCURL, CURLOPT_UPLOAD, FALSE);
>>curl_easy_setopt(m_pCURL, CURLOPT_HTTPGET, TRUE);
>>curl_easy_setopt(m_pCURL, CURLOPT_WRITEFUNCTION, wxcurldav_mem_write);
>>curl_easy_setopt(m_pCURL, CURLOPT_WRITEDATA, (void*)&data);
>
>What type is data? This is an interesting mix of C++ classes used in a
>var-arg C-function like curl_easy_setopt(). How does your compiler
>understands it needs to cast a 'wxString' to a 'char*'? AFAIK, you can put
>anything in a
>var-func without any conversion done behind your back.
wxString is a wxWidgets class:
http://http://www.wxwidgets.org/manuals/2.4.2/wx368.htm#wxstring
which has an operator const char*. Perhaps I ought to implicitly cast it
here? But it is still odd that it works in one case, and not in others.
Casey
_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar – get it now!
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
Received on 2004-06-10