cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: CURLFORM_BUFFER vs CURLFORM_PTR

From: Mohun Biswas <m_biswas_at_mailinator.com>
Date: Thu, 31 Aug 2006 10:36:03 -0400

Daniel Stenberg wrote:
> No it isn't. I'd say it is a bug. But I can't see any code that
> lowercases the string?

Let me try it again to make sure I'm not mistaken. It was late at night.

> FILENAME was added meant for the case where you use FILE but want to
> show another file name in the part than what you use locally.
>
> This example snippet does no file upload so setting file name for it
> makes little sense.

I understand, but I do wish there was a way to take a buffer and tell
the server it represents a file[*] while using COPY behavior. Without
having looked at the code in detail, it seems to me most intuitive that
the presence of CURLFORM_FILENAME should in all cases be interpreted as
a flag indicating that a file part is wanted. But I have no idea if this
would be easy or hard, or just wrong.

[*] This may be a lie but it seems like a harmless one. The sort of lie
a client should be allowed to tell a server.

> Yes, that's exactly how it is (supposed to be).
>
>> I would be happy to try contributing a doc patch to improve this once
>> I understand it sufficiently.
>
> I'm sure I'm not the only one who'd welcome such a contribution!

I'll try to give it a first shot this weekend.

MB
Received on 2006-08-31