cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: 7.9.4: multipart/form-data (-F) option syntax

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sat, 16 Feb 2002 18:23:15 +0100 (MET)

On Sat, 9 Feb 2002, kromJx wrote:

Hi

Thanks for your mail. Sorry it took a while to reply. I've been away and I
just got back.

> The choice of ':' as a delimiter for the file content type argument
> curl -F "coolfiles=@fil1.gif;type=image/gif"
> is rather unfortunate as it makes it difficult to set things like
> Content-Type: text/plain; charset=iso-8859-2

I agree. I couldn't come up with any better way than this though. Can you
come up with a better syntax that offers the same functionality with the same
easiness?

> and does not (currently) support Content-Transfer-Encoding.

Ah, it passes everything the same way, right. But then I've not yet seen any
receiver who makes any differences.

> When one uploads a binary file or some text in a language using characters
> above 127, 'curl' should be instructed to use 'base64', 'quoted-printable'
> or '8bit' transfer encoding

Curl always transfers the data 8bit, and so far I have never got a report
from someone not being able to transport binary data even if it doesn't use
the Content-Transfer-Encoding header. In fact, when curl once tried to use it
("Content-Transfer-Encoding: binary") it turned out that some receivers even
malfunctioned when doing so.

The receivers (being the core PHP code) argued that they did the right thing,
and thus to make curl work better I stopped using the header and this in fact
made people happier! ;-O

If you think different, if you have examples proving me wrong or if you have
code that brings missing funcionality, then I and several others will be very
interested to hear!

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
Received on 2002-02-16