jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1621516 - /jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/CacheManager.java
Date Sat, 30 Aug 2014 18:50:14 GMT
Author: pmouawad
Date: Sat Aug 30 18:50:14 2014
New Revision: 1621516

URL: http://svn.apache.org/r1621516
Log:
Switch to HttpClient for Date parsing in Header

Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/CacheManager.java

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/CacheManager.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/CacheManager.java?rev=1621516&r1=1621515&r2=1621516&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/CacheManager.java
(original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/CacheManager.java
Sat Aug 30 18:50:14 2014
@@ -32,11 +32,11 @@ import java.util.Map;
 import org.apache.commons.collections.map.LRUMap;
 import org.apache.commons.httpclient.HttpMethod;
 import org.apache.commons.httpclient.URIException;
-import org.apache.commons.httpclient.util.DateParseException;
-import org.apache.commons.httpclient.util.DateUtil;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.http.HttpResponse;
 import org.apache.http.client.methods.HttpRequestBase;
+import org.apache.http.impl.cookie.DateParseException;
+import org.apache.http.impl.cookie.DateUtils;
 import org.apache.jmeter.config.ConfigTestElement;
 import org.apache.jmeter.engine.event.LoopIterationEvent;
 import org.apache.jmeter.protocol.http.sampler.HTTPSampleResult;
@@ -191,8 +191,8 @@ public class CacheManager extends Config
             }
             if (expires != null) {
                 try {
-                    expiresDate = DateUtil.parseDate(expires);
-                } catch (DateParseException e) {
+                    expiresDate = DateUtils.parseDate(expires);
+                } catch (org.apache.http.impl.cookie.DateParseException e) {
                     if (log.isDebugEnabled()){
                         log.debug("Unable to parse Expires: '"+expires+"' "+e);
                     }
@@ -212,8 +212,8 @@ public class CacheManager extends Config
                 } else if(expires==null) { // No max-age && No expires
                     if(!StringUtils.isEmpty(lastModified) && !StringUtils.isEmpty(date))
{
                         try {
-                            Date responseDate = DateUtil.parseDate( date );
-                            Date lastModifiedAsDate = DateUtil.parseDate( lastModified );
+                            Date responseDate = DateUtils.parseDate( date );
+                            Date lastModifiedAsDate = DateUtils.parseDate( lastModified );
                             // see https://developer.mozilla.org/en/HTTP_Caching_FAQ
                             // see http://www.ietf.org/rfc/rfc2616.txt#13.2.4 
                             expiresDate=new Date(System.currentTimeMillis()



Mime
View raw message