cURL / Mailing Lists / curl-users / Single Mail

curl-users

Using -F

From: Sven Rudolph <rudolph_at_medical-tribune.de>
Date: Thu, 05 Oct 2000 19:35:41 +0200

Hello

I have problems using the -F option.
I tried the following:
curl --proxy proxy:8080 --proxy-user name:passwd -F
"userfile=@testpic.jpg" http://www.server.tld/upload.php3

The .jpg is 28711 Bytes, but when it arives at the server it has 28746
Bytes and can't be displayed by a browser anymore.
When I look at the picture on the server with an editor, I can see the
following in the first line:
"ntent-Transfer-Encoding: binary"

When I remove this line, the .jpg can be displayed by a browser again.
Since my upload.php3 is just writing the file to disk, I must assume
that curl is corrupting the file.

Is that a bug or a feature?
Is there a workaround?

Thanks in advance

Sven Rudolph
Received on 2000-10-05