curl-users
答复: Re: 转发: Why libcurl sent two request packet for on "curl_multi_add_handle"?
Date: Tue, 17 Apr 2012 21:58:02 -0400
Thank you very much.
----- 原始消息 -----
发件人: curl-users-bounces_at_cool.haxx.se <curl-users-bounces_at_cool.haxx.se>
收件人: curl-users_at_cool.haxx.se <curl-users_at_cool.haxx.se>
发送时间: Tue Apr 17 07:19:11 2012
主题: Re: 转发: Why libcurl sent two request packet for on "curl_multi_add_handle"?
On Tue, Apr 17, 2012 at 06:44:21AM -0400, Jason Liu wrote:
> I set these options, maybe not exactly:
> curl_easy_setopt(m_handle, CURLOPT_VERBOSE, 1);
Note that this (and all the binary constant options) require a long to
be passed in, not an int.
> As I captured the packets, first time, it sent one request without the
> degist credentials, the second time, it sent with the degist
> credentials. I did only call the "curl_multi_add_handle" one time.
That's how Digest works. The server sends a nonce (among other data)
that the client uses to calculate its authorization header. The client
can't do this without first receiving a response from the server. The first
Digest request therefore requires at least two round trips to the server.
Subsequent transactions don't require the extra round trip, at least
until the time stamp expires.
>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
---------------------------------------------------------------------
This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-04-18