public void testSendCookie2() throws Exception { man.add(new Cookie("id", "value", ".apache.org", "/", false, 9999999999L)); HTTPSamplerBase sampler = new HTTPNullSampler(); sampler.setDomain("jakarta.apache.org"); sampler.setPath("/index.html"); sampler.setMethod(HTTPSamplerBase.GET); assertNotNull(man.getCookieHeaderForURL(sampler.getUrl())); }
/** * Set domain on sampler * * @param sampler {@link HTTPSamplerBase} * @param request {@link HttpRequestHdr} */ protected void computeDomain(HTTPSamplerBase sampler, HttpRequestHdr request) { sampler.setDomain(request.serverName()); if (log.isDebugEnabled()) { log.debug("Proxy: setting server: " + sampler.getDomain()); } }