DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG� RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=33796>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND� INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=33796 Summary: JMeter sending null cookies. Product: JMeter Version: 2.0.2 Platform: PC OS/Version: Windows XP Status: NEW Severity: critical Priority: P2 Component: HTTP AssignedTo: [email protected] ReportedBy: [EMAIL PROTECTED] The web application I am load testing is written in Java. Apache is the web server, WebLogic the web container. We are using SiteMinder for user authentication. First I will describe the scenario: 1. Send HTTP Request to login user. Siteminder logs user in successfully and sends a FORMCRED cookie back to the client. 2. The second HTTP Request to any page on the site works successfully. It sends back the FORMCRED cookie to the server. SiteMinder picks up the FORMCRED cookie, validates it and sets it to null (or empty string) and sends back a SMSESSION cookie. 3. The third and all subsequent requests then send SMSESSION cookie to the server. They dont send the FORMCRED cookie anymore since it is now null. This is how IE and Netscape work when sending cookies to the server. Neither of them send cookies with null value back to the server. JMeter, on the other hand, sends all cookies back to the server even if they have been nulled out. So, on the third request JMeter sends FORMCRED back to the server. SiteMinder sees it and tries to validate it. Since FORMCRED is null (or empty string), SiteMinder kicks the user back to the login page. Thus my test case fails when I run it in JMeter. I fixed this issue my modifying org.apache.jmeter.protocol.http.control.CookieManager.java file. I modified the public void add(Cookie) method. Below is my modification: /** * Add a cookie. */ public void add(Cookie c) { /** My Modification Start */ if (c.getValue() == null || c.getValue().equals("")) { removeCookieNamed(c.getName()); } /** My Modification End */ else { JMeterContext context = getThreadContext(); getCookies().addItem(c); if (context.isSamplingStarted()) { context.getVariables().put(c.getName(), c.getValue()); } } } I am not sure if I have fixed a bug or if the bug is in SiteMinder since it should be reading FORMCRED if it is null. Either way, I wanted to submit my modification and let you decide if you want to put it into JMeter. Nizar Noorani Consultant, Tallan, Inc. [EMAIL PROTECTED] -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
