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 Jamie Davidson <Ja...@bridgewatersystems.com> on 2001/07/26 16:41:47 UTC
CookieManager issues
I have uncovered a few more simple issues with the CookieManager which have been causing me some grief:
The method CookieManager.getCookieFromHeader(String, URL) will use the URL properties to set the domain and path information for the cookie, rather than the information encapsulated within the cookie itself.
String domain = url.getHost(); //still use original code for defaults - is this required ?
String path = url.getFile();
// NEW CODE STARTS HERE//
String tokName;
//we have made some assumptions up above which may not prove correct...
while (st.hasMoreTokens())
{
nvp = st.nextToken();
delim = nvp.indexOf('=',0);
tokName = nvp.substring(0, delim).trim();
//unfortunately we cannot make any assumptions concerning the order of the attributes...
if (tokName.equalsIgnoreCase("domain"))
{
domain = nvp.substring(delim+1);
}
else if (tokName.equalsIgnoreCase("path"))
{
path = nvp.substring(delim+1);
}
}
//NEW CODE ENDS HERE//
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org