Can't Siege use --header and --file at one time?

473 views
Skip to first unread message

ttsujie

unread,
Jun 30, 2011, 5:25:40 AM6/30/11
to Siege Users
Hello!

I want to add Referer header, because the program checks referer.

This is success.
siege --header="Referer: http://foo/bar" "http://foo/bar/post POST
aaa=bbb"

This is failure.
siege --header="Referer: http://foo/bar" --file=url.txt
(I wrote "http://foo/bar/post POST aaa=bbb" in url.txt (without "))

Can't Siege use --header and --file at one time?

Jeff Fulmer

unread,
Jun 30, 2011, 8:20:42 AM6/30/11
to siege...@googlegroups.com
you can use --header and --file but for some reason there is a parsing
issue when those flags are used some of the time. It looks like a bug.
I'll investigate further.

Jeff Fulmer

unread,
Jun 30, 2011, 8:37:35 AM6/30/11
to siege...@googlegroups.com
By any chance are you running this on cygwin? I can reproduce the
problem on cygwin, but I can't reproduce it on GNU/Linux.

$ siege -c1 -r2 --header="Referer: http://foo/bar" --file=urls.txt
** SIEGE 2.71b6
** Preparing 1 concurrent users for battle.
The server is now under siege...
[Thu, 2011-06-30 08:37:14] HTTP/1.1 200 0.12 secs: 1769 bytes ==> /rp/
[Thu, 2011-06-30 08:37:15] HTTP/1.1 200 0.08 secs: 26963 bytes ==>
/rp/inc/s_code.js


On Thu, Jun 30, 2011 at 5:25 AM, ttsujie <tts...@gmail.com> wrote:

ttsujie

unread,
Jul 1, 2011, 3:22:38 AM7/1/11
to Siege Users
Thank you for reply.

> By any chance are you running this on cygwin?
I run on Linux that.

My program checks some validateion ( include referer) and returns code
302 (redirect) in success case.
But in failure case, that returns code 200.

> This is success.
> siege --header="Referer:http://foo/bar" "http://foo/bar/postPOST
> aaa=bbb"
HTTP/1.1 302 0.21 secs: 20 bytes ==> /bar/post
HTTP/1.1 200 1.94 secs: 18779 bytes ==> /bar

> This is failure.
> siege --header="Referer:http://foo/bar" --file=url.txt
> (I wrote "http://foo/bar/postPOST aaa=bbb" in url.txt (without "))
HTTP/1.1 200 2.91 secs: 20 bytes ==> /bar/post

I found what is problem. header is unconcerned.
I found "#" in post parameter value. In failure case, it seems that it
is ignored parameters after "#".
After change parameer value, it became no problem.

Any way, I could go forward. Thank you.

Jeff Fulmer

unread,
Jul 1, 2011, 7:56:08 AM7/1/11
to siege...@googlegroups.com
Yeah, # is a comment in file space but a fragment in URL space. I
didn't worry about that discrepancy since fragments are meaningless in
HTTP - the browser uses them in app space.

ttsujie

unread,
Jul 2, 2011, 3:06:09 AM7/2/11
to Siege Users
Thank you for reply.
I understand.

Now everything is OK.
I appreciate such usefull tool and kind support.
Reply all
Reply to author
Forward
0 new messages