cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Re: Curl + Php + Orkut

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 24 Jun 2008 22:30:46 +0200 (CEST)

On Tue, 24 Jun 2008, Dan Myers wrote:

> Sorry, I told you wrong. I meant this:
>
> $headers[] = "Content-length: ".filesize($arquivo)."\n";
> curl_setopt ($ch, CURLOPT_HTTPHEADER, $headers);

And this too is totally wrong. He's doing a multipart formpost and thus the
Content-length: must be for the _entire_ POST not just the particular file
that is included in there.

Besides, libcurl always adds Content-length: by itself and changing that
yourself is usually just a recipe for getting trouble.

-- 
  / daniel.haxx.se
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2008-06-24