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 2006/01/13 07:43:57 UTC

DO NOT REPLY [Bug 38256] New: - Set-cookie headers with no "path" attribute incorrectly processed by CookieManager

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=38256>.
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=38256

           Summary: Set-cookie headers with no "path" attribute incorrectly
                    processed by CookieManager
           Product: JMeter
           Version: Nightly (Please specify date)
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: HTTP
        AssignedTo: jmeter-dev@jakarta.apache.org
        ReportedBy: bherndon@kodakgallery.com


JMeter's HTTP CookieManager (as of 2.1.20060112) processes set-cookie headers by
initially setting the new cookie's path to the same path as the requested URL
(modified slightly to trim the terminal page name).  When a set-cookie header
comes in with no path attribute, the URL's path is left in the cookie and that
path is used as the lookup key.  This is different than contemporary browsers
that use the root path (i.e., "/") as the path for set-cookie headers that lack
a path attribute.

The current behavior can cause many requests to set cookies with incorrect path
causing downstream failures for HTTP requests that need cookies that would
ordinarily be passed becauese thay have a root path.

The problem seems to be lines 327 through 336 of:

org.apache.jmeter.protocol.http.control.CookieManager

...method setCookieFromHeader()

-- 
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: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org


Re: DO NOT REPLY [Bug 38256] - Set-cookie headers with no "path" attribute incorrectly processed by CookieManager

Posted by sebb <se...@gmail.com>.
On 14/01/06, I Love JMeter <il...@gmail.com> wrote:
> On 1/13/06, sebb <se...@gmail.com> wrote:>Just checking: was that
> branch/rel-2-1 or tags/rel-2_1?
>
> What's the difference between branch/rel-2-1 (Which I assume is the same as
> setting my subversion repository to
> http://svn.apache.org/repos/asf/jakarta/jmeter/branch/rel-2-1) and

yes

> tags/rel-2-1 (http://svn.apache.org/repos/asf/jakarta/jmeter/tags/rel-2_1) ?
>

tags are for a specific release, and refer to a specific version of each file.
branches are used for ongoing development of parallel versions

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


Re: DO NOT REPLY [Bug 38256] - Set-cookie headers with no "path" attribute incorrectly processed by CookieManager

Posted by I Love JMeter <il...@gmail.com>.
On 1/13/06, sebb <se...@gmail.com> wrote:>Just checking: was that
branch/rel-2-1 or tags/rel-2_1?

What's the difference between branch/rel-2-1 (Which I assume is the same as
setting my subversion repository to
http://svn.apache.org/repos/asf/jakarta/jmeter/branch/rel-2-1) and
tags/rel-2-1 (http://svn.apache.org/repos/asf/jakarta/jmeter/tags/rel-2_1) ?

Re: DO NOT REPLY [Bug 38256] - Set-cookie headers with no "path" attribute incorrectly processed by CookieManager

Posted by sebb <se...@gmail.com>.
On 14/01/06, I Love JMeter <il...@gmail.com> wrote:
> I can't tell if the patch from bherndon got applied or not.

Yes it did

> I have updated my sources from subversion to rel-2-1

Just checking: was that branch/rel-2-1 or tags/rel-2_1?

> I see a bunch of code commented out in CookieManager.java
> It looks like to me it all got replaced with just one line of code?

Yes. See his comment:

"I should note that I don't think that the URL setting that is being replaced is
necessary since browsers don't behave as if they ever use the submission URL."

Note the word "replaced".

> I am unable to figure out if it fixed my previous problems, perhaps
> the JMeter behavior I thought was screwy, and the Jmeter behavior
> the fellow from kodakgallery thought was screwy, are two different things.
>

Not a clue what you mean by this ...

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


Re: DO NOT REPLY [Bug 38256] - Set-cookie headers with no "path" attribute incorrectly processed by CookieManager

Posted by I Love JMeter <il...@gmail.com>.
I can't tell if the patch from bherndon got applied or not.

I have updated my sources from subversion to rel-2-1

I see a bunch of code commented out in CookieManager.java
It looks like to me it all got replaced with just one line of code?

I am unable to figure out if it fixed my previous problems, perhaps
the JMeter behavior I thought was screwy, and the Jmeter behavior
the fellow from kodakgallery thought was screwy, are two different things.

On 1/13/06, bugzilla@apache.org <bu...@apache.org> wrote:
>
> 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=38256>.
> 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=38256
>

DO NOT REPLY [Bug 38256] - Set-cookie headers with no "path" attribute incorrectly processed by CookieManager

Posted by bu...@apache.org.
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=38256>.
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=38256





------- Additional Comments From bherndon@kodakgallery.com  2006-01-13 08:36 -------
Sorry my comment for attachment 38406 should have said the replaced code is *not
necessary* but could be useful elsewhere.


-- 
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: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org


DO NOT REPLY [Bug 38256] - Set-cookie headers with no "path" attribute incorrectly processed by CookieManager

Posted by bu...@apache.org.
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=38256>.
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=38256


sebb@apache.org changed:

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




------- Additional Comments From sebb@apache.org  2006-01-13 21:12 -------
Thanks, applied to 2.1 branch.

By the way, the patches were quite difficult to use.
They were not in unified diff format, so could not be used by Eclipse.

-- 
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: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org


DO NOT REPLY [Bug 38256] - Set-cookie headers with no "path" attribute incorrectly processed by CookieManager

Posted by bu...@apache.org.
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=38256>.
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=38256





------- Additional Comments From bherndon@kodakgallery.com  2006-01-13 08:30 -------
Created an attachment (id=17407)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=17407&action=view)
Patch for CookieManager#setCookieFromHeader

I should note that I don't think that the URL setting that is being replaced is
necessary since browsers don't behave as if they ever use the submission URL. 
However, the the replaced code could be useful if moved to the section where
the set-cookie header *WITH* a path attribute is detected. 

-- 
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: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org


DO NOT REPLY [Bug 38256] - Set-cookie headers with no "path" attribute incorrectly processed by CookieManager

Posted by bu...@apache.org.
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=38256>.
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=38256





------- Additional Comments From bherndon@kodakgallery.com  2006-01-13 08:33 -------
Created an attachment (id=17408)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=17408&action=view)
4 JUnit test cases to cover the set-cookie behavior

The first two of these test cases should fail on 2.1.20060112 and succeed after
application of patch 17406.  The other two are included for completeness.

-- 
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: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org


DO NOT REPLY [Bug 38256] - Set-cookie headers with no "path" attribute incorrectly processed by CookieManager

Posted by bu...@apache.org.
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=38256>.
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=38256





------- Additional Comments From bherndon@kodakgallery.com  2006-01-13 08:30 -------
Created an attachment (id=17406)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=17406&action=view)
Patch for CookieManager#setCookieFromHeader

I should note that I don't think that the URL setting that is being replaced is
necessary since browsers don't behave as if they ever use the submission URL. 
However, the the replaced code could be useful if moved to the section where
the set-cookie header *WITH* a path attribute is detected. 

-- 
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: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org