https://issues.apache.org/bugzilla/show_bug.cgi?id=48163
--- Comment #8 from John Samford <[email protected]> 2009-11-16 06:09:49 UTC --- Thanks for taking so much time with me. This is my first foray into trying to add something to an Apache open source project. What I did to get the source I was using was to go to the JMeter downloads page: http://jakarta.apache.org/site/downloads/downloads_jmeter.cgi where it says one can get source. I just checked the CacheManager there against what I've been using and they are identical. Is that "trunk"? Here's the version of setHeaders() which I've got which is called by the failing test: public void setHeaders(HttpURLConnection conn, URL url) { CacheEntry entry = (CacheEntry) getCache().get(url.toString()); if (log.isDebugEnabled()){ log.debug(conn.getRequestMethod()+"(Java) "+url.toString()+" "+entry); } if (entry != null){ final String lastModified = entry.getLastModified(); if (lastModified != null){ conn.addRequestProperty(HTTPConstantsInterface.IF_MODIFIED_SINCE, lastModified); } final String etag = entry.getEtag(); if (etag != null){ conn.addRequestProperty(HTTPConstantsInterface.IF_NONE_MATCH, etag); } } It gets its CacheEntry using the URL's toString as an index into the threadCache map. You're correct: it WOULD be better not to have to be connected to the internet to run the test! I've submitted a newer version of the test class which uses localhost (and a stub version of URLConnection to allow controlling what getHeaderField() returns for Last-Modified & Etag). -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
