Jagg Crossbone | 2 Sep 2009 17:05
Favicon

curl command (post data question)


Hi,

I have problems sending the correct -d command with/for the following url

http://www.handelsblatt.com/default.aspx?_p=389&wp1_symbol=DXU9.DTB&wp1_t=wp1_quoteshistory

On this site there are dropdown menus for 

"Darstellung:" (default: Tag) 
and 
"Zeilen pro Seite:" (default: 20)

I want to change these two menus with post commands to "Darstellung:" = 5 and "Zeilen pro Seite:" = 100 with
this command:

curl -d
"ctl00%24ctl00%24ctl22%24ctl00%24ctl03%24DD_Step=5&ctl00%24ctl00%24ctl22%24ctl00%24ctl03%24DD_Lines=100"
"http://www.handelsblatt.com/default.aspx?_p=389&wp1_symbol=DXU9.DTB&wp1_t=wp1_quoteshistory"
> source.html

The post data variables I used in my command are from the "Liive HTTP headers" addon for firefox (so i think
these are the correct ones?!)

Do I miss something else in the -d parameter?!

Thanks a lot
Jagg
------------------------------------------------------------------------------------
XMail.net Communications Center
(Continue reading)

Daniel Stenberg | 2 Sep 2009 17:15
Picon
Favicon
Gravatar

Re: curl command (post data question)

On Wed, 2 Sep 2009, Jagg Crossbone wrote:

> http://www.handelsblatt.com/default.aspx?_p=389&wp1_symbol=DXU9.DTB&wp1_t=wp1_quoteshistory

> curl -d 
>
"ctl00%24ctl00%24ctl22%24ctl00%24ctl03%24DD_Step=5&ctl00%24ctl00%24ctl22%24ctl00%24ctl03%24DD_Lines=100" 
>
"http://www.handelsblatt.com/default.aspx?_p=389&wp1_symbol=DXU9.DTB&wp1_t=wp1_quoteshistory" 
> > source.html

> Do I miss something else in the -d parameter?!

There are three more hidden fields in that form that you don't send. The 
__VIEWSTATE one is likely to be vital.

--

-- 

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

Chris Cross | 2 Sep 2009 17:56
Picon
Favicon

Re: curl chunk option?



daniel <at> cool.haxx.se wrote on 07/15/2009 04:30:26 PM:

>
> On Wed, 15 Jul 2009, Chris Cross wrote:
>
> > I'm using curl to test my server application's performance with very large
> > messages, ie, messages > 1GB. Is there an option to use chunked encoding so
> > curl doesn't buffer the entire message?
>
> I assume you mean you're sending data over HTTP, and then no the curl tool
> will not do that with -d, but you can use -F or HTTP PUT with -T. Oryou write
> your own test tool using libcurl or a libcurl binding to do exactly what you
> want.
>

Daniel, curl certainly appears to be streaming instead of buffering the message but in both cases, -T and -F, the headers say Content-length. Is there an option to force curl to use "Transfer-encoding: chunked" ?

Thanks,
Chris


Chris Cross
DataPower Development
xcross <at> us.ibm.com
office 561-793-5110

-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Daniel Stenberg | 3 Sep 2009 09:39
Picon
Favicon
Gravatar

Re: curl chunk option?

On Wed, 2 Sep 2009, Chris Cross wrote:

> Daniel, curl certainly appears to be streaming instead of buffering the
> message

This statement confuses me as well, as -d certainly "buffers" the entire thing 
in memory before it gets sent. But once it has buffered the file in ram it 
will "stream" it to the server.

> but in both cases, -T and -F, the headers say Content-length. Is
> there an option to force curl to use "Transfer-encoding: chunked" ?

Yes you can, at least with -T. With -F there's simply no point in trying to 
enforce that, as you won't gain anything due to how (lib)curl will evaluate 
the full size of what to send before it starts to send anything - anyway. With 
-T - or -d  <at> - for example you can force chunked encoding getting used in the 
request body by using:

  -H "Transfer-Encoding: chunked"

--

-- 

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

Chris Cross | 3 Sep 2009 15:57
Picon
Favicon

Re: curl chunk option?


daniel <at> cool.haxx.se wrote on 09/03/2009 03:39:04 AM:

> On Wed, 2 Sep 2009, Chris Cross wrote:
>
> > Daniel, curl certainly appears to be streaming instead of buffering the
> > message
>
> This statement confuses me as well, as -d certainly "buffers" the
> entire thing
> in memory before it gets sent. But once it has buffered the file in ram it
> will "stream" it to the server.

I mean streaming defined as not buffering, so from your previous instructions started using -T in lieu of -d.

>
> > but in both cases, -T and -F, the headers say Content-length. Is
> > there an option to force curl to use "Transfer-encoding: chunked" ?
>
> Yes you can, at least with -T. With -F there's simply no point in trying to
> enforce that, as you won't gain anything due to how (lib)curl will evaluate
> the full size of what to send before it starts to send anything -
> anyway. With
> -T - or -d <at> - for example you can force chunked encoding getting used in the
> request body by using:
>
>   -H "Transfer-Encoding: chunked"

I tried this:

   curl -H "Transfer-Encoding: chunked" -T file5M http://localhost/cgi-bin/chunked-upload

and saw in the packet capture that the the header for the POST was indeed changed, using "Transfer-Encoding: chunked" instead of Content-length. However, subsequent packets are continuation with data only and not the chunked headers one would expect. Am I still missing something?

Thanks,
Chris

-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Jagg Crossbone | 3 Sep 2009 16:14
Favicon

Re: curl command (post data question)


I tried it with the __VIEWSTATE field and also with the complete post data 
(I fetched with "live http headers" addon for firefox) but no chance to get
"Darstellung:" = 5 and "Zeilen pro Seite:" = 100 :-(

Here is for example the complete post data command I tried (long sorry):

curl -d "ctl00_ctl00_ScriptManagerWP1_HiddenField=&__EVENTTARGET=&__EVENTARGUMENT=&__LASTFOCUS=&__VIEWSTATE=%2FwEPDwUENTM4MQ9kFgJmD2QWAmYPZBYEAgEPZBYCZg8WAh4EaHJlZgUcaHR0cDovL3d3dy5oYW5kZWxzYmxhdHQuY29tL2QCDQ9kFgQCBQ9kFgJmD2QWAmYPZBYGZg9kFgQCAQ8QZGQWAWZkAgcPEGRkFgFmZAIBD2QWHgIBDxYCHglpbm5lcmh0bWwFEURBWCBGdXR1cmUgU2VwIDA5ZAIDDxYEHwEFM1R5cDombmJz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IFNlcCAwOTxzcGFuIGNsYXNzPSJhcnJvdyI%2BPC9zcGFuPjwvYT48L2xpPjxsaSBjbGFzcz0iaWNvRmlTdG9ja01vbmV5QiI%2BPGEgaHJlZj0iL2FrdGllbi9Wb2xrc3dhZ2VuLUFrdGllIj5Wb2xrc3dhZ2VuIEFHPHNwYW4gY2xhc3M9ImFycm93Ij48L3NwYW4%2BPC9hPjwvbGk%2BZBgBBR5fX0NvbnRyb2xzUmVxdWlyZVBvc3RCYWNrS2V5X18WAgUxY3RsMDAkY3RsMDAkY3RsMjIkY3RsMDAkY3RsMDMkQ0J4X0NhcGl0YWxNZWFzdXJlcwUrY3RsMDAkY3RsMDAkY3
 RsMjIkY3RsMDAkY3RsMDMkSUJ0bl9SZWZyZXNoMQ%3D%3D&ctl00%24ctl00%24ctl22%24ctl00%24ctl00%24DepotDropDownList=161998&ctl00%24ctl00%24ctl22%24ctl00%24ctl00%24SymbolDropDownList=&ctl00%24ctl00%24c!

tl22%24ctl00%24ctl03%24DD_Day=3&ctl00%24ctl00%24ctl22%24ctl00%24ctl03%24DD_Month=9&ctl00%24ctl00%24ctl22%24ctl00%24ctl03%24DD_Year=2009&ctl00%24ctl00%24ctl22%24ctl00%24ctl03%24Txt_Time=23%3A59&ctl00%24ctl00%24ctl22%24ctl00%24ctl03%24DD_Step=5&ctl00%24ctl00%24ctl22%24ctl00%24ctl03%24DD_Lines=100&ctl00%24ctl00%24ctl22%24ctl00%24ctl03%24IBtn_Refresh1.x=44&ctl00%24ctl00%24ctl22%24ctl00%24ctl03%24IBtn_Refresh1.y=8"
"http://www.handelsblatt.com/finanzen/kursprofil/_p=389,wp1_symbol=DXU9.DTB,wp1_t=wp1_quoteshistory"
> source.html

Quoting Daniel Stenberg :

> On Wed, 2 Sep 2009, Jagg Crossbone wrote:
> 
> >
> http://www.handelsblatt.com/default.aspx?_p=389&wp1_symbol=DXU9.DTB&wp1_t=wp1_quoteshistory
> 
> > curl -d 
> >
> "ctl00%24ctl00%24ctl22%24ctl00%24ctl03%24DD_Step=5&ctl00%24ctl00%24ctl22%24ctl00%24ctl03%24DD_Lines=100"
> 
> >
> "http://www.handelsblatt.com/default.aspx?_p=389&wp1_symbol=DXU9.DTB&wp1_t=wp1_quoteshistory"
> 
> > > source.html
> 
> > Do I miss something else in the -d parameter?!
> 
> There are three more hidden fields in that form that you don't send. The 
> __VIEWSTATE one is likely to be vital.
> 
> -- 
> 
>   / daniel.haxx.se
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
> FAQ:        http://curl.haxx.se/docs/faq.html
> Etiquette:  http://curl.haxx.se/mail/etiquette.html
>
------------------------------------------------------------------------------------
XMail.net Communications Center
-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Doug McNutt | 3 Sep 2009 16:56
Favicon

Re: curl command (post data question)

At 16:14 +0200 9/3/09, Jagg Crossbone wrote:
>I tried it with the __VIEWSTATE field and also with the complete post data 
>(I fetched with "live http headers" addon for firefox) but no chance to get
>"Darstellung:" = 5 and "Zeilen pro Seite:" = 100 :-(
>
>Here is for example the complete post data command I tried (long sorry):
>
>curl -d "ctl00_ctl00_ScriptManagerWP1_HiddenField=&__EVENTTARGET=&__EVENTARGUMENT=&__LASTFOCUS=&__VIEWSTATE=%2FwEPDwUENTM4MQ9kFgJmD2QWAmYPZBYEAgEPZBYCZg8WAh4EaH

big SNIP by
DPM

3%24Txt_Time=23%3A59&ctl00%24ctl00%24ctl22%24ctl00%24ctl03%24DD_Step=5&ctl00%24ctl00%24ctl22%24ctl00%24ctl03%24DD_Lines=100&ctl00%24ctl00%24ctl22%24ctl00%24ctl03%24IBtn_Refresh1.x=44&ctl00%24ctl00%24ctl22%24ctl00%24ctl03%24IBtn_Refresh1.y=8"
"http://www.handelsblatt.com/finanzen/kursprofil/_p=389,wp1_symbol=DXU9.DTB,wp1_t=wp1_quoteshistory"
> source.html

It's possible, depending on your OS, that you are exceeding some limit for the length of a command line. It
certainly would exceed the limit in my first UNIX account, circa 1981.

I'm pretty sure the -d option can accept a file as an argument - something like  <at> /tmp/path.

--

-- 
--> So are we going to celebrate the start of a new decade at the end of this year? Or do the tens start at in
January 2011? <--
-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Denis Sacchet | 3 Sep 2009 19:57

Re: Explicit FTP upload with encrypted data channel block on STOR

>> Quite clearly. And what does the curl process think at the same moment?
> Not sure to understand, I clearly see the passive connection back to the 
> server, and some exchange, and more especially the write of the STOR 
> command on the socket, but then, the poll seems to indicates curl is 
> waiting for something.... So if the server and the client wait for 
> something, we will go nowhere :(

Does my last strace give you some hint for a potential solution ?

Do you want an account on this server to try to debug ?

Best regards

Denis Sacchet

--

-- 
Denis Sacchet aka. Ouba                     ("`-/")_.-'"``-._
                                              . . `; -._    )-;-,_`)
"Computers are like air conditionners       (v_,)'  _  )`-.\  ``-'
They stop working properly when you        _.- _..-_/ / ((.'
open Windows !!!"                        ((,.-'   ((,/
-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Linus Nielsen Feltzing | 4 Sep 2009 07:36
Picon
Favicon
Gravatar

Re: curl command (post data question)

Jagg Crossbone wrote:
> I tried it with the __VIEWSTATE field and also with the complete post data 
> (I fetched with "live http headers" addon for firefox) but no chance to get
> "Darstellung:" = 5 and "Zeilen pro Seite:" = 100 :-(

You must probably do it in two steps. First you do a plain GET request 
of the front page in order to receive the correct session cookie(s):

1) curl -c cookiejar.txt http://www.handelsblatt.com/default.aspx

Then you extract the hidden form fields (__VIEWSTATE et al) and perform 
the POST:

2) curl -b cookiejar.txt -c cookiejar.txt -d "__VIEWSTATE=xxxxx" ... 
http://blablablabla...

Linus

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

Daniel Stenberg | 4 Sep 2009 13:44
Picon
Favicon
Gravatar

Re: curl chunk option?

On Thu, 3 Sep 2009, Chris Cross wrote:

> I tried this:
>
>   curl -H "Transfer-Encoding: chunked" -T file5M
> http://localhost/cgi-bin/chunked-upload
>
> and saw in the packet capture that the the header for the POST was indeed 
> changed, using "Transfer-Encoding: chunked" instead of Content-length. 
> However, subsequent packets are continuation with data only and not the 
> chunked headers one would expect. Am I still missing something?

What headers would you expect that aren't there? I just tried this myself to 
verify and I get a fine chunked-encoded PUT that way.

--

-- 

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


Gmane