cURL / Mailing Lists / curl-users / Single Mail


Re: problem uploading files using web form

From: Daniel Stenberg <>
Date: Mon, 19 Nov 2001 14:06:55 +0100 (MET)

On Sat, 17 Nov 2001, David Sinclair wrote:

> I am using free webspace at which does not allow FTP
> uploading. The upload form looks essentially like this:

[HTML form cut out]

> curl -# -v -F "upload0=@image.jpg" -F "user-name={user-name}" -F
> "pass-key={session-id}" -F "work-dir=images/" -F "page=0" -F
> "form-type=fm" -F "num-files=2" -F "submit=submit"
> which works fine *if* image.jpg is less than about 8K in size. More than
> that, and the server returns a server error 500. There is no such limit
> when uploading with IE 5 or Mozilla.
> I am using curl 7.9.1 (win32-nossl) on the Win ME command line.
> Ideas anyone?


There's exactly nothing in the curl code that considers the file size. It'll
get files of *any* length (the amount of available ram is the limit) and
build a form post with it.

500? The error code 500 is defined in the RFC to mean: "The server
encountered an unexpected condition which prevented it from fulfilling the

I figure you haven't asked the admins of the site to check the logs to see
why this happens?

Anyone else encountered something like this?

It would probably be very useful if you could use a network sniffer to snoop
on the requests the browsers use and compare them with the request curl uses.
Apart from that, I don't have many good suggestions. I'm puzzled.

    Daniel Stenberg -- curl groks URLs --
Received on 2001-11-19