webClient.getCookieManager().getCookies(url);
Set<Cookie> retCookies = new HashSet<Cookie>();
for (com.gargoylesoftware.htmlunit.util.Cookie c : rawCookies) {
if (c.getPath() != null && getPath().startsWith(c.getPath())) {
retCookies.add(new ReturnedCookie(c.getName(), c.getValue(), c.getDomain(), c.getPath(),
c.getExpires(), c.isSecure(), getCurrentUrl()));
}
}
return retCookies;
}