Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I use the --header option to send cookies with Siege?

I have just started to use Siege to do load/stressing test on a new web server. I am trying to test on my most resource/performance heavy script, but the script requires cookies. What is the proper format for using the --header option in siege?

I have tried this with no luck:

siege --header="Set-Cookie: PHPSESSID=--COOKIE--; iptoken=--COOKIE--" http://www.myurl.com/script.php,

There is no documentation on this that I could find, so any ideas/suggestions would be appreciated.

like image 224
Andrew Avatar asked Apr 20 '12 08:04

Andrew


People also ask

How do I send a cookie request in header?

To send cookies to the server, you need to add the "Cookie: name=value" header to your request. To send multiple Cookies in one cookie header, you can separate them with semicolons. In this Send Cookies example, we are sending HTTP cookies to the ReqBin echo URL.

How do you set a cookie header?

The Set-Cookie HTTP response header is used to send a cookie from the server to the user agent, so that the user agent can send it back to the server later. To send multiple cookies, multiple Set-Cookie headers should be sent in the same response.

Are cookies automatically sent to server?

No. Not every request sends the cookies. It depends on the cookie configuration and client-server connection. For example, if your cookie's secure option is set to true then it must be transmitted over a secure HTTPS connection.


1 Answers

The answer is to use --header="Cookie: --COOKIE_DATA--" (ref. wiki.wsmoak.net/cgi-bin/wiki.pl?Siege).

like image 182
Andrew Avatar answered Sep 30 '22 02:09

Andrew