0
我已經設置圍攻(v2.70)來測試一個擁有登錄名的webapp,然後我有一個約180個url的列表來強調測試應用程序的速度。問題在於cookie在被登錄網址返回時被忽略。如何獲得圍攻以使用Cookie進行基準測試和負載測試
這裏是圍攻和應用程序之間的網絡流量的tcpdump的(box.example.org已經取代了實際的URL,這是沒有問題的)
你可以看到設置Cookie在第一個響應,然後在下一個GET請求中看不到該cookie。我發現這一點:
How do I use the --header option to send cookies with Siege?
但我需要發送cookie取決於登錄,我不能硬編碼。該FAQ表示支持他們,但tcpdump的,否則認爲:
20:25:48.003094 IP (tos 0x0, ttl 64, id 31699, offset 0, flags [DF], proto TCP (6), length 223)
192.168.20.34.48923 > 192.168.20.81.80: Flags [P.], seq 2734994720:2734994891, ack 3331849910, win 913, options [nop,nop,TS val 2229194446 ecr 50245070], length 171
E...{[email protected]@......"...Q...P... ...............
........GET /saml/testlogon/ HTTP/1.1^M
Host: box.example.org^M
Accept: */*^M
Accept-Encoding: gzip^M
User-Agent: JoeDog/1.00 [en] (X11; I; Siege 2.70)^M
Connection: close^M
^M
20:25:48.406571 IP (tos 0x0, ttl 64, id 21369, offset 0, flags [DF], proto TCP (6), length 427)
192.168.20.81.80 > 192.168.20.34.48923: Flags [P.], seq 1:376, ack 171, win 972, options [nop,nop,TS val 50245160 ecr 2229194446], length 375
[email protected]@.<....Q...".P...............*.....
...(....HTTP/1.1 302 FOUND^M
Date: Wed, 21 Nov 2012 02:33:32 GMT^M
Server: Apache/2.2.22 (Ubuntu)^M
Vary: Cookie,Accept-Encoding^M
Set-Cookie: sessionid=233511e6001797ec77f7f3a08683ce97; httponly; Path=/^M
Location: http://box.example.org/viewer/start/^M
Content-Encoding: gzip^M
Content-Length: 20^M
Connection: close^M
Content-Type: text/html; charset=utf-8^M
^M
....................
20:25:49.410684 IP (tos 0x0, ttl 64, id 3041, offset 0, flags [DF], proto TCP (6), length 221)
192.168.20.34.48924 > 192.168.20.81.80: Flags [P.], seq 1168563186:1168563355, ack 1414846755, win 913, options [nop,nop,TS val 2229194798 ecr 50245422], length 169
[email protected]@..v..."...Q...PE...TT.#...........
........GET /viewer/start/ HTTP/1.1^M
Host: box.example.org^M
Accept: */*^M
Accept-Encoding: gzip^M
User-Agent: JoeDog/1.00 [en] (X11; I; Siege 2.70)^M
Connection: close^M
^M
20:25:49.419109 IP (tos 0x0, ttl 64, id 30222, offset 0, flags [DF], proto TCP (6), length 375)
192.168.20.81.80 > 192.168.20.34.48924: Flags [P.], seq 1:324, ack 169, win 972, options [nop,nop,TS val 50245424 ecr 2229194798], length 323
[email protected]@......Q...".P..TT.#E........*.....
...0....HTTP/1.1 302 FOUND^M
Date: Wed, 21 Nov 2012 02:33:34 GMT^M
Server: Apache/2.2.22 (Ubuntu)^M
Vary: Cookie,Accept-Encoding^M
Location: http://box.example.org/saml/testlogon/?next=/viewer/start/^M
Content-Encoding: gzip^M
Content-Length: 20^M
Connection: close^M
Content-Type: text/html; charset=utf-8^M
^M
爲什麼URLS不在SO上加下劃線?爲什麼它們與普通文本的顏色非常接近? – boatcoder