ASF Bugzilla – Attachment 24856 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 2.3.4
jmeter-ajp-cookies-2_3_4.patch (text/plain), 2.07 KB, created by
Rainer Jung
on 2010-01-18 10:04:02 UTC
(
hide
)
Description:
Patch against 2.3.4
Filename:
MIME Type:
Creator:
Rainer Jung
Created:
2010-01-18 10:04:02 UTC
Size:
2.07 KB
patch
obsolete
>Index: tags/v2_3_4/src/protocol/http/org/apache/jmeter/protocol/http/sampler/AjpSampler.java >=================================================================== >--- tags/v2_3_4/src/protocol/http/org/apache/jmeter/protocol/http/sampler/AjpSampler.java (revision 831099) >+++ tags/v2_3_4/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; >@@ -177,7 +178,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 > } > >@@ -302,16 +303,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) { >@@ -482,4 +486,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