curl-users
Re: Post a file to a URL
Date: Fri, 19 Oct 2007 13:28:56 -0400
You will not be able to hit this IP address: 157.184.32.21. It is on an
internal network. When I run the cURL command below it times out.
On 10/18/07, Will Weatherford <fiveweatherfords_at_gmail.com> wrote:
>
> Thanks Ramesh, but i still have a problem after increasing the timeout to
> 20 and the connect to 20...
>
> C:\Boeing>"C:\Boeing\curl.exe" --connect-time 20 --max-time 20 -F
> input_file=@"C
> :\Boeing\V34True.ucf;type=multipart/form-data;"
> http://157.184.32.21/cgi-bin/dyn
> amic/config/secure/importsettings.html
> <HTML><HEAD><LINK REL="stylesheet" HREF="/configStyle.css"
> TYPE="text/css">
> <TITLE>File Received</TITLE>
> </HEAD>
> <BODY><H1>File Received</H1><HR SIZE=2 ALIGN=LEFT WIDTH="75%" NOSHADE><A
> HREF="/
> cgi-bin/dynamic/config/gen/importexport.html">Return</A>
> </<BODY></HTML>
>
>
>
>
> On 10/18/07, Babu, Ramesh (LBD) <Ramesh.Babu_at_lombardvm.com > wrote:
> >
> > Hi,
> >
> > user --connect-time parameter in your command, increase value for
> > --max-time. I hope the problem is with your netwrok.
> >
> > if you specify --connect-time 10
> >
> > CURL waits 10 seconds to connect to URL, if it is connected, command
> > will be executed. If not, gives the error mentioned by you. Mention this
> > parameter before --max-time.
> >
> > --max-time 6, curl waits 6 seconds to finish the command. If command
> > couldn't finish in 6 second, it returns error message.
> >
> > so increase parameters for --connect-time and --max-time or remove these
> > parameters from your command. I hope this works fine.
> >
> >
> > Ramesh Babu
> > ------------------------------
> > *From:* curl-users-bounces_at_cool.haxx.se [mailto:
> > curl-users-bounces_at_cool.haxx.se] *On Behalf Of *Will Weatherford
> > *Sent:* Thursday, October 18, 2007 2:06 PM
> > *To:* curl-users_at_cool.haxx.se
> > *Subject:* Post a file to a URL
> >
> > cURL Users,
> >
> > I am trying to post a file to a URL (hosted by a printer) via
> > cURL. When I do it through FireFox with HTTPHeadaers on I get:
> >
> > http://157.184.32.21/cgi-bin/importfile/cgi-bin/dynamic/config/secure/importsettings.html
> >
> >
> > POST
> > /cgi-bin/importfile/cgi-bin/dynamic/config/secure/importsettings.html
> > HTTP/1.1
> > Host: 157.184.32.21
> > User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: 1.8.1.7)
> > Gecko/20070914 Firefox/2.0.0.7
> > Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9
> > ,text/plain;q=0.8,image/png,*/*;q=0.5
> > Accept-Language: en-us,en;q=0.5
> > Accept-Encoding: gzip,deflate
> > Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
> > Keep-Alive: 300
> > Connection: keep-alive
> > Referer: http://157.184.32.21/cgi-bin/dynamic/config/secure/importsettings.html
> >
> > Content-Type: multipart/form-data;
> > boundary=---------------------------19074277212554
> > Content-Length: 253
> > -----------------------------19074277212554
> > Content-Disposition: form-data; name="input_file"; filename="
> > V34False.ucf"
> > Content-Type: application/x-download
> >
> > // anything
> >
> > mfp.fax.enableV34 "false"
> >
> > -----------------------------19074277212554--
> >
> > HTTP/1.x 200 OK
> > Content-Type: text/html
> > ----------------------------------------------------------
> > http://157.184.32.21/cgi-bin/dynamic/config/gen/importexport.html
> >
> > GET /cgi-bin/dynamic/config/gen/importexport.html HTTP/1.1
> > Host: 157.184.32.21
> > User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: 1.8.1.7)
> > Gecko/20070914 Firefox/2.0.0.7
> > Accept: text/xml,application/xml,application/xhtml+xml,text/html;q= 0.9
> > ,text/plain;q=0.8,image/png,*/*;q=0.5
> > Accept-Language: en-us,en;q=0.5
> > Accept-Encoding: gzip,deflate
> > Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
> > Keep-Alive: 300
> > Connection: keep-alive
> > Referer: http://157.184.32.21/cgi-bin/importfile/cgi-bin/dynamic/config/secure/importsettings.html
> >
> >
> > HTTP/1.x 200 OK
> > Expires: Sun, 27 Feb 1972 08:00:00 GMT
> > Pragma: no-cache
> > Cache-Control: no-cache
> > Content-Type: text/html
> >
> > I have tried posting the file V34True.ucf with this command:
> >
> > "C:\Boeing\curl.exe" --max-time 6 -F
> > input_file=@"C:\Boeing\V34True.ucf;type=multipart/form-data" http://157.184.31.21/cgi-bin/dynamic/config/secure/importsettings.html
> > > "C:\Boeing\V34TrueUCFOutput.txt"
> >
> > The contents of V34True.ucf:
> >
> > // anything
> >
> > mfp.fax.enableV34 "true
> >
> >
> > This is what I get when I run the command from the DOS box:
> >
> > C:\Boeing>"C:\Boeing\curl.exe" --max-time 6 -F
> > input_file=@"C:\Boeing\V34True .uc
> > f;type=multipart/form-data" http://157.184.31.21/cgi-bin/dynamic/config/secure/
> >
> > importsettings.html > "C:\Boeing\V34TrueUCFOutput.txt"
> >
> > curl: (28) connect() timed out!
> >
> > C:\Boeing>
> >
> >
> >
> > Any advice on posting this file would be appreciated.
> >
> > *** WARNING : This message originates from the Internet ***
> >
> > The opinions expressed in this email represent those of the individual
> > and not necessarily those of Lombard Vehicle Management Limited.
> >
> > The contents of this email may be privileged and are confidential.
> > It may not be disclosed to or used by anyone other than the
> > addressee(s), nor copied in any way. If received in error, please
> > advise the sender, then delete from your system.
> >
> > Should you wish to use email as a mode of communication,
> > Lombard Vehicle Management Limited is unable to guarantee the security
> > of email content outside our own computer systems.
> > Lombard Vehicle Management Limited
> >
> > Registered in England. No 2597082
> > Registered Office: 3 Princess Way, Redhill, Surrey, RH1 1NP
> > A member of the Royal Bank of Scotland Group.
> > Lombard Vehicle Management Limited is an appointed representative of The Royal Bank of Scotland plc, which is authorised and regulated by the Financial Services Authority
> >
> >
>
Received on 2007-10-19