OK. Here is a sample of a client script, edited for the sake of this debugging effort. I verified that this same script reproduces the missing cookies in the header when making a request from our Apache environment (.php site). However, this same script works as expected (including cookies in header) when I point it at a different environment that is running IIS 6 (.net site).
For the sake of this test, the settings.ubr script is throttled way back: clients=1; virtualclients=1
As noted by the comments in the client script, I added a delay to further reduce unnecessary traffic.
Here are the steps I have been using to help reproduce and isolate the issue:
-
Configure Microsoft Network Monitor's capture filter: capture only traffic to/from the IP address of the target environment; capture only HTTP protocol traffic.
-
Configure the settings script for minimal load: clients=1; virtualclients=1.
-
Execute WCCTL (pointed at the client.ubr and settings.ubr).
-
Execute WCCLIENT
-
The client script is only 10 second and it will only complete a few iterations: stop the network monitor and inspect the frame details, particularly the "HTTP:Request, GET /"
RESULT: For any given iteration, the request header does not include cookies. As noted by comments in the client script, the second request should have a cookie in the header. When the same script is pointed at an IIS 6 environment, the expected cookies appear in the header when the second request in the transaction is made.
Here is a sample snippet of the header when WCAT is pointed at Apache:
- Http: Request, GET /
Command: GET
+ URI: /?second_request
ProtocolVersion: HTTP/1.1
TESTER: testing testing
Accept-Encoding: gzip, deflate
Accept-Language: en-us
Accept: */*
Host: tigard.katu.com
Connection: keep-alive
HeaderEnd: CRLF
Here is a sample snippet of the header when WCAT is pointed at IIS 6. For the sake of this posting, I manually truncated most of the text that appeared in the Cookie header, signified by the "[...]":
- Http: Request, GET /
Command: GET
+ URI: /?second_request
ProtocolVersion: HTTP/1.1
TESTER: testing testing
Accept-Encoding: gzip, deflate
Accept-Language: en-us
Accept: */*
Host: awio1
Connection: keep-alive
Cookie: sess_last=10/28/2009 [...];
HeaderEnd: CRLF
////////////////////////////////////////////////////////////////////////////////////
scenario
{
name = "Home Page";
warmup = 5;
duration = 10; //seconds
cooldown = 5;
default
{
setheader
{
name = "Connection";
value = "keep-alive";
}
setheader
{
name = "Host";
value = server();
}
setheader
{
name = "Accept";
value = "*/*";
}
setheader
{
name = "Accept-Language";
value = "en-us";
}
setheader
{
name = "Accept-Encoding";
value = "gzip, deflate";
}
addheader
{
name = "TESTER";
value = "testing testing";
}
version = HTTP11;
//by default, cookies is set to true
cookies =true;
close = ka;
}
transaction
{
id = "default page";
weight = 100;
// clear any pre-existing cookies for virtual user.
cookies
{
clear = true;
}
// Given the clear cookie element (above),
// no cookie expected in header of first request.
request
{
url = "/?first_request";
statuscode = 200;
}
// EXPECT cookie to appear in the following request header:
request
{
url = "/?second_request";
statuscode = 200;
}
// DELAY added to help throttle iterations/requests.
sleep
{
delay = 3000;
}
}
}
////////////////////////////////////////////////////////////////////////////////////