elvis | 1 Apr 2010 20:07
Picon

Please help me to make request

Hi!
Please help me to make curl request that can provide file-post http request

So http body must be like this

Content-Type: multipart/form-data; 
boundary=---------------------------53240779711139602362867867
Content-Length: 4579
-----------------------------53240779711139602362867867
Content-Disposition: form-data; name="PAGEID"

6
-----------------------------53240779711139602362867867
Content-Disposition: form-data; name="Upload_LOG"; 
filename="132x64_voicespin.dob"
Content-Type: application/octet-stream

<84> <at> 

html code looks like that

<form action="/cgi-bin/ConfigManApp.com" method="post" 
encType="multipart/form-data">
<table width="700" height="30" border="0" align="center" cellpadding="0" 
cellspacing="0" id="table_logo"  style="display:none" >
<input type="hidden" name="PAGEID" value="6">
<input name="Upload_LOG" type=file size="25">
<input onClick="AddLog()" type="button" value="Upload" name="addlog" 
style="width:80px">

(Continue reading)

Daniel Stenberg | 1 Apr 2010 20:30
Picon
Favicon
Gravatar

Re: Please help me to make request

On Thu, 1 Apr 2010, elvis wrote:

> <form action="/cgi-bin/ConfigManApp.com" method="post" 
> encType="multipart/form-data">
> <table width="700" height="30" border="0" align="center" cellpadding="0" 
> cellspacing="0" id="table_logo"  style="display:none" >
> <input type="hidden" name="PAGEID" value="6">
> <input name="Upload_LOG" type=file size="25">
> <input onClick="AddLog()" type="button" value="Upload" name="addlog" 
> style="width:80px">
>
> curl -u adn:adn -F Upload_LOG= <at> pin.ob 
> "http://192.168.0.168/cgi-bin/Config.com"

> but how can I add to this request hidden value like in another 
> Content-Disposition

Just add another -F:

curl -u adn:adn -F Upload_LOG= <at> pin.ob -F PAGEID=6 [URL]

--

-- 

  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html

(Continue reading)

Scott Taylor | 1 Apr 2010 22:07
Picon

Re: curl-users Digest, Vol 56, Issue 1

I thought this would send the "mycsr.csr" file to the remote server for signing. So the two commands I was using to try this were:
====================
# curl --cacert cert.pem --data CertRequest=mycsr.csr -d Mode=newreq -d TargetStoreFlags=0 -d SaveCert=yes --data-urlencode CertAttrib=\r\n https://ca.myserver.com/certsrv/certfnsh.asp

# curl --cacert cert.pem -G -d ReqID=115 -d Enc-bin https://ca.myserver.com/certsrv/certnew.cer
====================

I thought I was getting an error because perhaps the .csr file should be converted to a .pem file first. If this does not do the job can you advise the best way to accomplish this? Again I'm trying to use curl to have a locally generated CSR signed by the remote CA server (MS 2008), and retrieve the signed certificate.

Thanks for any direction you can provide.


That command line only sends five name=variable pairs separated with
ampersands (--trace-ascii shows you that). I don't see how that sends any file
at all to the remote server.

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Mike Hutchinson | 2 Apr 2010 08:08

Michael Hutchinson/UK/RoyalSun is out of the office.

I will be out of the office starting  01/04/2010 and will not return until
12/04/2010.

For urgent queries regarding Web Quote Followup output please Email or
contact Richard Z Mason or Ian C Dawson in Data ervices and cc me in.
Otherwise I will respond to your message when I return.

______________________________________________________________________

**********************************************************************

MORE TH>N ® is a trading style of Royal & Sun Alliance

Insurance plc (No. 93792). Registered in England and Wales at

St. Mark's Court, Chart Way, Horsham, West Sussex RH12 1XL.

Authorised & regulated by the Financial Services Authority

For your protection, telephone calls will be recorded and may be

monitored.

The information in this e-mail is confidential and may be read, copied

or used only by the intended recipients. If you have received it in

error please contact the sender immediately by returning the e-mail or

by telephoning the number contained in the body of the e-mail and

please delete the e-mail and do not disclose any of its contents to

anyone. No responsibility is accepted for loss or damage arising from

viruses or changes made to this message after it was sent.

**********************************************************************

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Daniel Stenberg | 2 Apr 2010 21:09
Picon
Favicon
Gravatar

Re: curl-users Digest, Vol 56, Issue 1

On Thu, 1 Apr 2010, Scott Taylor wrote:

Please don't top-post.

> I thought this would send the "mycsr.csr" file to the remote server for
> signing. So the two commands I was using to try this were:
> ====================
> # curl --cacert cert.pem --data CertRequest=mycsr.csr -d Mode=newreq -d
> TargetStoreFlags=0 -d SaveCert=yes --data-urlencode CertAttrib=\r\n
> https://ca.myserver.com/certsrv/certfnsh.asp

No, this doesn't send any file. See the man page for details on how -d 
(which is the same option as --data) works.

--

-- 

  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Mohit Gupta | 6 Apr 2010 11:36
Picon

Curl 7.19.2 Crash on opening Ftp second connection while uploading.

Hi Daniel,

Could any help me finding a fix for Crash ?

I am using Curl 7.19.2. Curl 7.19.2 is crashing while uploading a file when using FTP. It working nicely with other protocol https, http and tftp.
I think, there is some problem while opening a data connection for FTP. I could see in ethereal capture that my application is crashing after sending ACK for
server's "Response code: Entering Passive Mode (227)".

Unfortunately in my application, i couldn't use debugger. But using printf, i could manage to see  CURLcode ftp_statemach_act(struct connectdata *conn) function which is logging
my printf statement.

Perhaps this issue is already fix. if yes, please provide the patch to fix the problem.

Thanks,

Mohit

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Daniel Stenberg | 6 Apr 2010 12:43
Picon
Favicon
Gravatar

Re: Curl 7.19.2 Crash on opening Ftp second connection while uploading.

On Tue, 6 Apr 2010, Mohit Gupta wrote:

> I am using Curl 7.19.2. Curl 7.19.2 is crashing while uploading a file when
> using FTP. It working nicely with other protocol https, http and tftp.
> I think, there is some problem while opening a data connection for FTP. I
> could see in ethereal capture that my application is crashing after sending
> ACK for
> server's "Response code: Entering Passive Mode (227)".
>
> Unfortunately in my application, i couldn't use debugger. But using printf,
> i could manage to see  CURLcode ftp_statemach_act(struct connectdata *conn)
> function which is logging
> my printf statement.
>
> Perhaps this issue is already fix. if yes, please provide the patch to fix
> the problem.

You're using libcurl within your application, right? Then I advice you to 
instead use the curl-library list to reach other libcurl users and hackers.

With such a fuzzy description of the problem with no traces or logs of any 
kind, it is impossible to say if this is a new problem or something we already 
fixed. I suggest you try with 7.20.0 and see if the problem remains, and if it 
does you go on to produce a better way for us to understand what you 
experience and post that to the curl-library list.

--

-- 

  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html

wd | 8 Apr 2010 05:14
Gravatar

Fwd: curl 'name look up timeout' error

Forward to curl-users mail list.

---------- Forwarded message ----------
From: wd <wd <at> wdicc.com>
Date: 2010/4/6
Subject: curl 'name look up timeout' error
To: curl-and-php <at> cool.haxx.se


hi,

I use curl_exec in php to get some date from a url like 'http://abc.com/page/1' on an linux server.

abc.com is not exists, I set it in /etc/hosts like '123.23.2.3 abc.com', I can ping this hostname correctly, and never lost any ping package.

But when I use curl_exec in php, randomly got error like this mail title said. The error code is 6.

Then I try to use curl in command line like 'curl http://abc.com/page/1', the same error randomly occur.

The curl version on that server is curl-devel-7.15.5-2.el5 and curl-7.15.5-2.el5.

I've tried download and compile the newest curl curl 7.20.0 by hand, and the error still there.

Some info may be useful:
Red Hat Enterprise Linux Server release 5.2 (Tikanga)
Apache 2.2.11 compile by hand.
PHP 5.2.9
curl-devel-7.15.5-2.el5
curl-7.15.5-2.el5. (and already tried curl 7.20.0)

Why does this happen? Any response would be welcome. thx.


-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Daniel Stenberg | 8 Apr 2010 20:11
Picon
Favicon
Gravatar

Re: Fwd: curl 'name look up timeout' error

On Thu, 8 Apr 2010, wd wrote:

> But when I use curl_exec in php, randomly got error like this mail title
> said. The error code is 6.
>
> Then I try to use curl in command line like 'curl http://abc.com/page/1', 
> the same error randomly occur.

That's probably because of something fishy in your network setup. Like a bad 
DNS, weird firewall or similar.

--

-- 

  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Palmer, Robert | 8 Apr 2010 20:51
Picon

Curl behavior with and without pipe

Below, you will find a bit of a brain-teaser for me.  In the first “curl” command it gives the expected listing of files on the 127.0.0.1 server (with no other output) – however, the second command line (which only adds a stdout pipe to an egrep) gives additional output as if I had turned an option on for it.  Any idea why? Also, how would I remove the extra output (which is nice to have in some cases just not this one)?  I know that I can go in and possibly analyze what is going on with strace/truss type utilities – but, thought I would try this (possibly) quicker solution first.  Thanks in advance for your help.

 

~

$ curl -l --ftp-port - ftp://127.0.0.1/

testdir

testdir2

testdir3

testfile

testfile10

testfile11

testfile12

testfile13

testfile14

testfile3

testfile4

testfile5

testfile6

testfile7

testfile8

testfile9

 

~

$ curl -l --ftp-port - ftp://127.0.0.1/ | egrep testfile1

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current

                                 Dload  Upload   Total   Spent    Left  Speed

176   176    0   176    0     0  14666      0 --:--:-- --:--:-- --:--:--     0

testfile10

testfile11

testfile12

testfile13

testfile14

 

Version info follows:

 

$ curl --version

curl 7.19.6 (i686-pc-cygwin) libcurl/7.19.6 OpenSSL/0.9.8n zlib/1.2.3 libidn/1.16 libssh2/1.2

Protocols: tftp ftp telnet dict http file https ftps scp sftp

Features: IDN IPv6 Largefile NTLM SSL libz

--
Robert

 

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Gmane