cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: What is the best way to debug this?

From: Igor Korot <ikorot01_at_gmail.com>
Date: Mon, 16 Jul 2012 18:06:32 -0700

Hi, Daniel

On Sun, Jul 15, 2012 at 2:00 PM, Daniel Stenberg <daniel_at_haxx.se> wrote:
> On Sun, 15 Jul 2012, Igor Korot wrote:
>
>> post = curl_slist_append( post, "Content-Type:
>> multipart/form-data" );
>
>
> Why not use CURLOPT_HTTPPOST then? Helps you with all the tricky details...
> See http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTHTTPPOST

If I switch to that option do I have to set
CURLOPT_INFILESIZE/CURLOPT_INFILESIZE_LARGE?

And what about my previous E-mail in this thread?

Thank you.

>
> Also, that content-type looks wrong. It is supposed to include the boundary
> string too there.
>
>
>> post = curl_slist_append( post, "Expect: 100-continue" );
>
>
> ... and libcurl adds this header when it deems it necesary.
>
>
>> post = curl_slist_append( post, "Connection: keep-alive" );
>
>
> This isn't necessary really. Unless you're talking to some really ancient
> server.
>
>> POST </my_dir>/Default.aspx HTTP/1.1
>
>
> ...
>
>
>> < HTTP/1.1 100 Continue
>> < HTTP/1.1 500 Internal Server Error
>
>
> This is a broken server. It is often the Expect: header that confuses stupid
> servers...
>
> --
>
> / daniel.haxx.se
>
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette: http://curl.haxx.se/mail/etiquette.html
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-07-17