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 bu...@apache.org on 2010/01/18 19:03:20 UTC

DO NOT REPLY [Bug 48568] New: CookieManager broken for AjpSampler

https://issues.apache.org/bugzilla/show_bug.cgi?id=48568

           Summary: CookieManager broken for AjpSampler
           Product: JMeter
           Version: 2.3.4
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: PatchAvailable
          Severity: normal
          Priority: P2
         Component: HTTP
        AssignedTo: jmeter-dev@jakarta.apache.org
        ReportedBy: rainer.jung@kippdata.de


Created an attachment (id=24855)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=24855)
Patch against trunk

We noticed two bugs when using the AjpSampler in combination with
CookieManager:

A) The cookie header is formatted incorrect and therefore not accepted by the
application

B) The cookie information is not passed along to the HTTPSampleResult

Problem A) comes from formatting the cookie via getStringValue(), which returns
something like a tab formatted list of the Cookie attributes. You can use a
simple JSP or Servlet containing

String cookie=request.getHeader("Cookie");
if (cookie != null) {
    out.println("Cookie: " + cookie);
}

to verify this. The fix consists in using an actual Cookie object instead of a
generic JMeterProperty and then retrieving Cookie name and value via getName()
and getValue().

Problem B) is fixed by calling res.setCookies().

See the atahced patches.

Thanks for the great Apache JMeter software!

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 48568] CookieManager broken for AjpSampler

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48568

Sebb <se...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #2 from Sebb <se...@apache.org> 2010-01-18 17:19:01 UTC ---
Good catch, thanks!


URL: http://svn.apache.org/viewvc?rev=900635&view=rev
Log:
Bug 48568 - CookieManager broken for AjpSampler

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 48568] CookieManager broken for AjpSampler

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48568

--- Comment #1 from Rainer Jung <ra...@kippdata.de> 2010-01-18 10:04:02 UTC ---
Created an attachment (id=24856)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=24856)
Patch against 2.3.4

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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