You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by Branislav Siarsky <si...@usa.com> on 2005/09/16 10:55:22 UTC

Cookie without PATH ignored?

Hi,

I make a HTTP POST request over SSL (LOGIN) with JMeter 2.1 on Windows XP and get from a server the following response 
(Output from View results tree) [follow redirects off]:

HTTP response code: 301
HTTP response message: Moved Permanently

HTTP response headers:
HTTP/1.1 301 Moved Permanently
Date: Fri, 16 Sep 2005 08:29:43 GMT
Server: Apache
Location: /sarasin/redirect?next=pers_cust_page&lang=DE&nav=all&refmulti=%2Fsarasin%2Fshow%2Fmain%2Fcustomer%2F1%2C%2C5-0-2%2C00.html&cookieName=vgn_creds&interessent=
Set-Cookie: e3login=23508736902642681802022897750884243822;Path=/
Set-Cookie: bsc_role=CUSTOMER
Set-Cookie: vgn_creds=CTR%2864%2D1%29%3Aday6fbiVtKKy3sZ8k9fTwqzKlIbo5qaYgrTrmZubgMjWj9SFdMTrjbrNy5zDt%2B25XcaM5rN2p3yyxLSntnOT1aOym9t6maTlz1nHudGEib%2BFqdi5
Set-Cookie: bsc_customer=2156
Set-Cookie: vgn_user=8750-9904
Set-Cookie: bsc_messages=2
Set-Cookie: SHARK=crxNj3B1bxpYrh
Set-Cookie: bsc_kundenbetreuer=true
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html


After this step JMETER generates the following HTTP request :

GET https://www.sarasinlink.com:443/lmp1rz?lang=DE&bsc_kunden_id=1716&referer=&lang=DE
Accept-Encoding: gzip, deflate, compress;q=0.9
Referer: http://localhost/lmp1rz?page=web51&lang=DE&referer=
Accept-Language: en-us, en;q=0.50
Host: localhost
Accept-Charset: ISO-8859-1, utf-8;q=0.66, *;q=0.66
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2) Gecko/20021126
Accept: application/x-shockwave-flash,text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,text/css,*/*;q=0.1
Keep-Alive: 300

Cookie Data:
e3login=23508736902642681802022897750884243822
Accept-Encoding: gzip, deflate, compress;q=0.9
Referer: http://localhost/lmp1rz?page=web51&lang=DE&referer=
Accept-Language: en-us, en;q=0.50
Host: localhost
Accept-Charset: ISO-8859-1, utf-8;q=0.66, *;q=0.66
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2) Gecko/20021126
Accept: application/x-shockwave-flash,text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,text/css,*/*;q=0.1
Keep-Alive: 300


So it looks like the Jmeter would not send the cookies, which have no Path parameter. 
I looked into the code of the CookieManager and in the method addCookieFromHeader
there is this logic ( if not cookie path set, add "/" as default ).

So I tried to integrate the source code into Eclipse and to debug it - it is not so easy
and I could not get it run in Eclipse, so

I have added some  log.error("Cookie path before "+path); log.error("Cookie path after "+path);
into CookieManager, recompiled it over Eclipse (I can compile, but I can not let it run), 
de-jared the ApacheJMeter_http.jar, replaced the CookieManager.class with my new version, 
Jared it again back, installed it into lib/ext and started JMeter.

I can see no output of my messages on the console screen, so I will try to integrate 
the JMeter into the Eclipse again.

Do you have please any ideas, why the cookieas without path are ignored?

Thanks a lot for your help to point me to the right direction
Branislav


-- 
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org


Re: Cookie without PATH ignored?

Posted by sebb <se...@gmail.com>.
Looks like a bug - please create a Bugzilla issue and attach any
necessary log files, scripts etc.

Does the problem only occur with 301 responses?

S.
On 16/09/05, Branislav Siarsky <si...@usa.com> wrote:
> Hi,
> 
> I make a HTTP POST request over SSL (LOGIN) with JMeter 2.1 on Windows XP and get from a server the following response
> (Output from View results tree) [follow redirects off]:
> 
> HTTP response code: 301
> HTTP response message: Moved Permanently
> 
> HTTP response headers:
> HTTP/1.1 301 Moved Permanently
> Date: Fri, 16 Sep 2005 08:29:43 GMT
> Server: Apache
> Location: /sarasin/redirect?next=pers_cust_page&lang=DE&nav=all&refmulti=%2Fsarasin%2Fshow%2Fmain%2Fcustomer%2F1%2C%2C5-0-2%2C00.html&cookieName=vgn_creds&interessent=
> Set-Cookie: e3login=23508736902642681802022897750884243822;Path=/
> Set-Cookie: bsc_role=CUSTOMER
> Set-Cookie: vgn_creds=CTR%2864%2D1%29%3Aday6fbiVtKKy3sZ8k9fTwqzKlIbo5qaYgrTrmZubgMjWj9SFdMTrjbrNy5zDt%2B25XcaM5rN2p3yyxLSntnOT1aOym9t6maTlz1nHudGEib%2BFqdi5
> Set-Cookie: bsc_customer=2156
> Set-Cookie: vgn_user=8750-9904
> Set-Cookie: bsc_messages=2
> Set-Cookie: SHARK=crxNj3B1bxpYrh
> Set-Cookie: bsc_kundenbetreuer=true
> Keep-Alive: timeout=15, max=100
> Connection: Keep-Alive
> Content-Type: text/html
> 
> 
> After this step JMETER generates the following HTTP request :
> 
> GET https://www.sarasinlink.com:443/lmp1rz?lang=DE&bsc_kunden_id=1716&referer=&lang=DE
> Accept-Encoding: gzip, deflate, compress;q=0.9
> Referer: http://localhost/lmp1rz?page=web51&lang=DE&referer=
> Accept-Language: en-us, en;q=0.50
> Host: localhost
> Accept-Charset: ISO-8859-1, utf-8;q=0.66, *;q=0.66
> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2) Gecko/20021126
> Accept: application/x-shockwave-flash,text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,text/css,*/*;q=0.1
> Keep-Alive: 300
> 
> Cookie Data:
> e3login=23508736902642681802022897750884243822
> Accept-Encoding: gzip, deflate, compress;q=0.9
> Referer: http://localhost/lmp1rz?page=web51&lang=DE&referer=
> Accept-Language: en-us, en;q=0.50
> Host: localhost
> Accept-Charset: ISO-8859-1, utf-8;q=0.66, *;q=0.66
> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2) Gecko/20021126
> Accept: application/x-shockwave-flash,text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,text/css,*/*;q=0.1
> Keep-Alive: 300
> 
> 
> So it looks like the Jmeter would not send the cookies, which have no Path parameter.
> I looked into the code of the CookieManager and in the method addCookieFromHeader
> there is this logic ( if not cookie path set, add "/" as default ).
> 
> So I tried to integrate the source code into Eclipse and to debug it - it is not so easy
> and I could not get it run in Eclipse, so
> 
> I have added some  log.error("Cookie path before "+path); log.error("Cookie path after "+path);
> into CookieManager, recompiled it over Eclipse (I can compile, but I can not let it run),
> de-jared the ApacheJMeter_http.jar, replaced the CookieManager.class with my new version,
> Jared it again back, installed it into lib/ext and started JMeter.
> 
> I can see no output of my messages on the console screen, so I will try to integrate
> the JMeter into the Eclipse again.
> 
> Do you have please any ideas, why the cookieas without path are ignored?
> 
> Thanks a lot for your help to point me to the right direction
> Branislav
> 
> 
> --
> ___________________________________________________________
> Sign-up for Ads Free at Mail.com
> http://promo.mail.com/adsfreejump.htm
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org