Using Siege to replace curl

945 views
Skip to first unread message

Joseph Hardeman

unread,
Oct 27, 2011, 12:26:09 PM10/27/11
to siege-users
Hi Everyone,

Maybe you can help me, I am trying to test a site but have been using curl since that is what the original script I was handed used.  I was wondering if I can replace it with siege.  Here is the command I am running one of a few that is :)

curl -H AUTH_TOKEN:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -s -k --data-binary @/tmp/directory/04865c9d9f4150b608f725609d72be603f88b136.xml.gz http://testsite.testsite.com/upload

I have around 2000 files I want to upload and benchmark this site with, but I am not getting the results I want from curl so I was hoping I could use siege instead.

Thanks

Joe

Jeff Fulmer

unread,
Oct 27, 2011, 2:19:10 PM10/27/11
to siege...@googlegroups.com
That looks like a multi-part form upload. Siege doesn't support that.
I keep waiting for someone to send me a patch that implements that.
Maybe I'll have to write that myself.... :-(

Joseph Hardeman

unread,
Oct 27, 2011, 3:43:58 PM10/27/11
to siege...@googlegroups.com
Hey Jeff,

From what I can tell the curl script uploads/posts a gzipped xml file and that file is stored in a database, they have another process that then extracts the info from that file.  I have ab working to post, but would rather used siege simply because I can tell it to benchmark it and blast the heck out of their web server.  LOL

Joe

Jeff Fulmer

unread,
Oct 27, 2011, 3:58:48 PM10/27/11
to siege...@googlegroups.com
Siege can post a file like this:

siege http://www.haha.com/homer POST < /my/file.gz

But it won't set multi-part headers so I'm sure you're server will be
like WTF? and ignore it

The file redirect is is mainly used to simplify POSTs by storing POST data

Joseph Hardeman

unread,
Oct 27, 2011, 6:54:36 PM10/27/11
to siege...@googlegroups.com
Hey Jeff,

I don't think it will work either, also, I am not seeing it using the .gz file, it won't even attempt it with the POST added in.  I am passing the -H or --header info but its not using it, I am just getting redirects back from the server.

I appreciate the response though.

Joe

Jeff Fulmer

unread,
Oct 27, 2011, 9:35:18 PM10/27/11
to siege...@googlegroups.com
I'll add that support someday but it probably won't be fast enough for you....

Cheers,
Jeff

Joseph Hardeman

unread,
Oct 27, 2011, 10:13:08 PM10/27/11
to siege...@googlegroups.com
LOL  Nope, not today at least.  heehee

Thanks for everything, if I ever get some time, maybe I will take a swing at it. :-)

Thanks for everything.

Joseph Hardeman

unread,
Oct 27, 2011, 11:47:27 PM10/27/11
to siege...@googlegroups.com
Hey Jeff,

Well I will be a country bumpkin, it was in the way I was using the commands, it does work.

By putting it in this way, the gzip file is being uploaded to their webserver:

siege -R /root/.siegerc --header="AUTH_TOKEN:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "http://testsite.testsite.com/uploads POST </tmp/testing/befe361eb9bfc4753787343bf2e0bf9b7eb00a5d.xml.gz"

I edited the xml file and put JOE in the name line and can see it in their database now.

Very cool.  :-)

Joe
Reply all
Reply to author
Forward
0 new messages