curl-users
Re: problem uploading files using web form
Date: Mon, 19 Nov 2001 14:06:55 +0100 (MET)
On Sat, 17 Nov 2001, David Sinclair wrote:
> I am using free webspace at crosswinds.net 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"
> http://upload.crosswinds.net/cgi-bin/upload.cgi
>
> 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?
Uh.
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
request."
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 -- http://curl.haxx.se/Received on 2001-11-19