cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Before message: Help about post a big file to a url via http?

From: <man_at_tfhs.net>
Date: Wed, 31 May 2006 13:25:50 -0000

On Wed, May 31, 2006, skylark liu <skylark0901_at_gmail.com> said:

> HI:
> I find the before message
> http://curl.haxx.se/mail/lib-2003-07/0027.html about
> post a big file via http. I also try this example in my VC, but the error
> message happens the following. I have setted my account /~skylark/media mode
> as 777 (drwxrwxrwx 2 skylark staff 4096 May 31 16:20 media
> ). Is there something I miss? Thanks a lot.

oh, yes. there is something you missed. like exactly how http works :)

you cannot upload files to a directory using POST over http. what you are
trying to do is more like how ftp works. http is used to pull information
from a file or script on your server. if you happen to send a file as
input to that script, then the script can do something with it. unless you
are using DAV, might want to research that too.

do some more reading before you code.

allan

>
> *******************************************************************************
> * About to connect() to WebServerIp port 80
> * Trying WebServerIp... * connected
> * Connected to WebServerIp (WebServerIp) port 80
>> POST /~skylark/media/ HTTP/1.1
> Host: WebServerIp
> Accept: */*
> Content-Length: 0
>
> < HTTP/1.1 404 Not Found
> < Date: Wed, 31 May 2006 08:50:39 GMT
> < Server: Apache/2.0.54 (Debian GNU/Linux) PHP/4.3.10-15
> < Content-Length: 315
> < Content-Type: text/html; charset=iso-8859-1
> <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
> <html><head>
> <title>404 Not Found</title>
> </head><body>
> <h1>Not Found</h1>
> <p>The requested URL /~skylark/media/ was not found on this server.</p>
> <hr>
> <address>Apache/2.0.54 (Debian GNU/Linux) PHP/4.3.10-15 Server at
> WebServerIp
> Port 80</address>
> </body></html>
> * Connection #0 to host WebServerIp left intact
> * Closing connection #0
> **************************************************************************************************************************
>

-- 
m. allan noah
IT Director, TfHS.net
ph# (804) 355-5489
tf# (866) 724-9722
fx# (804) 355-0477
Received on 2006-05-31