cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Performance of POST method

From: Hanno L. Kranzhoff <kranzhoff_at_neptunelabs.com>
Date: Sat, 1 Dec 2001 22:50:23 +0100

> Hi! At the first time my program runs it takes almost a second between

> curl_easy_perform() and the callback set by CURLOPT_WRITEFUNCTION in
> curl_easy_setopt. Next requests are faster, but not very good either.
> Even if the form and the size of the answer are minimal and Apache is
> running on the same machine, I get this latency.
>
> I know it's not a problem of Apache. So how can I speed up a POST
method
> using libcurl?

Pedro,
I faced the same problem as you did.
The solution for me was to disable the "Expect: 100-continue"
header with

---
 m_headerlist = curl_slist_append(m_headerlist, "Expect:");
---
Now there's no delay between the header and the data-part anymore.
Comments in the sourcecode state that "Expect: 100-continue" is
intended to speedup posts, but at least in my case it did the exact
opposite.
hth, Hanno Kranzhoff
Received on 2001-12-02