[java-openws COMMIT] /branches/REL_1/src/main/java/org/opensaml/util/resource/HttpResource.java

noreply at shibboleth.net noreply at shibboleth.net
Thu Feb 23 13:44:10 GMT 2012


Author: lajoie
Date: Thu Feb 23 13:44:09 2012
New Revision: 425

URL: http://svn.shibboleth.net/view/java-openws?rev=425&view=rev
Log:
Add a Connection:close header

Modified:
    branches/REL_1/src/main/java/org/opensaml/util/resource/HttpResource.java

Modified: branches/REL_1/src/main/java/org/opensaml/util/resource/HttpResource.java
URL: http://svn.shibboleth.net/view/java-openws/branches/REL_1/src/main/java/org/opensaml/util/resource/HttpResource.java?rev=425&r1=424&r2=425&view=diff
==============================================================================
--- branches/REL_1/src/main/java/org/opensaml/util/resource/HttpResource.java (original)
+++ branches/REL_1/src/main/java/org/opensaml/util/resource/HttpResource.java Thu Feb 23 13:44:09 2012
@@ -81,6 +81,7 @@
     /** {@inheritDoc} */
     public boolean exists() throws ResourceException {
         HeadMethod headMethod = new HeadMethod(resourceUrl);
+        headMethod.addRequestHeader("Connection", "close");
 
         try {
             httpClient.executeMethod(headMethod);
@@ -109,6 +110,7 @@
     /** {@inheritDoc} */
     public DateTime getLastModifiedTime() throws ResourceException {
         HeadMethod headMethod = new HeadMethod(resourceUrl);
+        headMethod.addRequestHeader("Connection", "close");
 
         try {
             httpClient.executeMethod(headMethod);
@@ -169,6 +171,7 @@
      */
     protected GetMethod getResource() throws ResourceException {
         GetMethod getMethod = new GetMethod(resourceUrl);
+        getMethod.addRequestHeader("Connection", "close");
 
         try {
             httpClient.executeMethod(getMethod);



More information about the commits mailing list