It is not really a bug. The JMeter CookieManager fulfils the standard
described in RFC 2109 - if the cookie path is not set (for all type
of responses 200, 301 etc.), the cookie is valid for the requested URI.

The problem is: all browsers implement a different behaviour -
if the cookie path is not set, they set it to "/".

So, our Web solution runs in every browsers, but can not be
tested with JMeter.

I do not know, how you process such cases, so we have made 
a special version of CookieManager, which has the same behaviour 
as all browsers have. This clone is working perfectly for us now.

b.

----- Original Message -----
From: sebb <[EMAIL PROTECTED]>
To: "JMeter Developers List" <[email protected]>
Subject: Re: Cookie without PATH ignored?
Date: Mon, 19 Sep 2005 12:47:54 +0100

> 
> 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.
> > 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&#9001;=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=&#9001;=DE
> > Accept-Encoding: gzip, deflate, compress;q=0.9
> > Referer: http://localhost/lmp1rz?page=web51&#9001;=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&#9001;=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: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to