ASF Bugzilla – Attachment 24855 Details for
Bug 48568
CookieManager broken for AjpSampler
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch against trunk
jmeter-ajp-cookies-trunk.patch (text/plain), 2.05 KB, created by
Rainer Jung
on 2010-01-18 10:03:11 UTC
(
hide
)
Description:
Patch against trunk
Filename:
MIME Type:
Creator:
Rainer Jung
Created:
2010-01-18 10:03:11 UTC
Size:
2.05 KB
patch
obsolete
>Index: trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/AjpSampler.java >=================================================================== >--- trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/AjpSampler.java (revision 828080) >+++ trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/AjpSampler.java (working copy) >@@ -27,6 +27,7 @@ > import java.net.URL; > > import org.apache.jmeter.protocol.http.control.AuthManager; >+import org.apache.jmeter.protocol.http.control.Cookie; > import org.apache.jmeter.protocol.http.control.CookieManager; > import org.apache.jmeter.protocol.http.control.Header; > import org.apache.jmeter.protocol.http.control.HeaderManager; >@@ -179,7 +180,7 @@ > setInt(getHeaderSize(method, url)); > String hdr = setConnectionHeaders(url, host, method); > res.setRequestHeaders(hdr); >- setConnectionCookies(url, getCookieManager()); >+ res.setCookies(setConnectionCookies(url, getCookieManager())); > setByte((byte)0xff); // Attributes not supported > } > >@@ -304,16 +305,19 @@ > return newValue.toString(); > } > >- private void setConnectionCookies(URL url, CookieManager cookies) { >+ private String setConnectionCookies(URL url, CookieManager cookies) { >+ String cookieHeader = null; > if(cookies != null) { >+ cookieHeader = cookies.getCookieHeaderForURL(url); > CollectionProperty coll = cookies.getCookies(); > PropertyIterator i = coll.iterator(); > while(i.hasNext()) { >- JMeterProperty header = i.next(); >+ Cookie cookie = (Cookie)(i.next().getObjectValue()); > setInt(0xA009); // Cookie >- setString(header.getName()+"="+header.getStringValue());//$NON-NLS-1$ >+ setString(cookie.getName()+"="+cookie.getValue());//$NON-NLS-1$ > } > } >+ return cookieHeader; > } > > private int translateHeader(String n) { >@@ -484,4 +488,4 @@ > inpos+= len+1; > return s; > } >-} >\ No newline at end of file >+}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 48568
: 24855 |
24856