Bug 57760 - View Results Tree : Cookie Header is wrongly shown as empty(no cookies) when viewing a recorder Sample Result
Summary: View Results Tree : Cookie Header is wrongly shown as empty(no cookies) when ...
Status: RESOLVED FIXED
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: HTTP (show other bugs)
Version: 2.13
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-25 21:45 UTC by Philippe Mouawad
Modified: 2017-10-27 12:59 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Mouawad 2015-03-25 21:45:00 UTC
In HTTPHC4Impl#getConnectionHeaders, this code:
     if(!HTTPConstants.HEADER_COOKIE.equalsIgnoreCase(requestHeaders[i].getName())) {
                    hdrs.append(requestHeaders[i].getName());
                    hdrs.append(": "); // $NON-NLS-1$
                    hdrs.append(requestHeaders[i].getValue());
                    hdrs.append("\n"); // $NON-NLS-1$
                }

removes Cookie header from displayed headers.
This hides very interesting information during recording for example and you get :
[no cookies] instead of very useful information.

Is there any reason to keep this code ?
Comment 1 Rainer Jung 2015-03-26 08:57:59 UTC
I haven't checked, but is that code also used when recording samples? In that case one would not want to have the cookie headers added to the generated http header config elements.

For use in listeners and post processors I agree that the info is useful.
Comment 2 Philippe Mouawad 2017-10-27 10:49:28 UTC
Author: pmouawad
Date: Fri Oct 27 10:49:08 2017
New Revision: 1813507

URL: http://svn.apache.org/viewvc?rev=1813507&view=rev
Log:
Bug 57760 - View Results Tree : Cookie Header is wrongly shown as empty(no cookies) when viewing a recorder Sample Result
Bugzilla Id: 57760

Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.java
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPJavaImpl.java
    jmeter/trunk/xdocs/changes.xml
Comment 3 Philippe Mouawad 2017-10-27 12:59:17 UTC
Author: pmouawad
Date: Fri Oct 27 12:54:39 2017
New Revision: 1813529

URL: http://svn.apache.org/viewvc?rev=1813529&view=rev
Log:
Bug 57760 - View Results Tree : Cookie Header is wrongly shown as empty(no cookies) when viewing a recorder Sample Result
Fix issue in Cookie extraction from Header
Add TestCookieManager.jmx to build

Bugzilla Id: 57760

Modified:
    jmeter/trunk/build.xml
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPJavaImpl.java
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.java
    
    
Author: pmouawad
Date: Fri Oct 27 12:52:36 2017
New Revision: 1813528

URL: http://svn.apache.org/viewvc?rev=1813528&view=rev
Log:
Bug 57760 - View Results Tree : Cookie Header is wrongly shown as empty(no cookies) when viewing a recorder Sample Result
Add Integration Tests
Bugzilla Id: 57760

Added:
    jmeter/trunk/bin/testfiles/TestCookieManager.csv
    jmeter/trunk/bin/testfiles/TestCookieManager.jmx   (with props)
    jmeter/trunk/bin/testfiles/TestCookieManager.xml   (with props)
    
Author: pmouawad
Date: Fri Oct 27 12:58:01 2017
New Revision: 1813530

URL: http://svn.apache.org/viewvc?rev=1813530&view=rev
Log:
Bug 57760 - View Results Tree : Cookie Header is wrongly shown as empty(no cookies) when viewing a recorder Sample Result
Fix svn:eol

Bugzilla Id: 57760

Modified:
    jmeter/trunk/bin/testfiles/TestCookieManager.csv   (props changed)
    jmeter/trunk/bin/testfiles/TestCookieManager.xml   (props changed)
Comment 4 The ASF infrastructure team 2022-09-24 20:37:59 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/3573