commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1203475 - in /commons/proper/vfs/trunk: core/src/main/java/org/apache/commons/vfs2/ core/src/main/java/org/apache/commons/vfs2/provider/http/ src/changes/
Date Fri, 18 Nov 2011 03:26:40 GMT
Author: ggregory
Date: Fri Nov 18 03:26:40 2011
New Revision: 1203475

URL: http://svn.apache.org/viewvc?rev=1203475&view=rev
Log: (empty)

Modified:
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/Resources.properties
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileObject.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpRandomAccessContent.java
    commons/proper/vfs/trunk/src/changes/changes.xml

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/Resources.properties
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/Resources.properties?rev=1203475&r1=1203474&r2=1203475&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/Resources.properties
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/Resources.properties
Fri Nov 18 03:26:40 2011
@@ -251,10 +251,10 @@ vfs.provider.sftp/unknown-size.error=Fil
 vfs.provider.url/badly-formed-uri.error=Badly formed URI "{0}".
 
 # Http Provider
-vfs.provider.http/get.error=GET method failed for "{0}".
-vfs.provider.http/head.error=HEAD method failed for "{0}".
+vfs.provider.http/get.error=GET method failed for "{0}" with HTTP status {1}.
+vfs.provider.http/head.error=HEAD method failed for "{0}" with HTTP status {1}.
 vfs.provider.http/last-modified.error=No Last-Modified header in HTTP response.
-vfs.provider.http/get-range.error=GET method failed for "{0}" range "{1}-".
+vfs.provider.http/get-range.error=GET method failed for "{0}" range "{1}" with HTTP status
{2}.
 vfs.provider.http/connect.error=Could not connect to HTTP server on "{0}".
 
 # WebDAV Provider

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileObject.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileObject.java?rev=1203475&r1=1203474&r2=1203475&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileObject.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileObject.java
Fri Nov 18 03:26:40 2011
@@ -91,7 +91,7 @@ public class HttpFileObject extends Abst
         }
         else
         {
-            throw new FileSystemException("vfs.provider.http/head.error", getName());
+            throw new FileSystemException("vfs.provider.http/head.error", new Object[]{getName(),
Integer.valueOf(status)});
         }
     }
 
@@ -156,7 +156,7 @@ public class HttpFileObject extends Abst
         }
         if (status != HttpURLConnection.HTTP_OK)
         {
-            throw new FileSystemException("vfs.provider.http/get.error", getName());
+            throw new FileSystemException("vfs.provider.http/get.error", new Object[]{getName(),
Integer.valueOf(status)});
         }
 
         return new HttpInputStream(getMethod);

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpRandomAccessContent.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpRandomAccessContent.java?rev=1203475&r1=1203474&r2=1203475&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpRandomAccessContent.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpRandomAccessContent.java
Fri Nov 18 03:26:40 2011
@@ -95,7 +95,8 @@ class HttpRandomAccessContent extends Ab
             throw new FileSystemException("vfs.provider.http/get-range.error", new Object[]
             {
                 fileObject.getName(),
-                new Long(filePointer)
+                Long.valueOf(filePointer),
+                Integer.valueOf(status)
             });
         }
 
@@ -109,7 +110,8 @@ class HttpRandomAccessContent extends Ab
                 throw new FileSystemException("vfs.provider.http/get-range.error", new Object[]
                 {
                     fileObject.getName(),
-                    new Long(filePointer)
+                    Long.valueOf(filePointer),
+                    Integer.valueOf(status)
                 });
             }
         }

Modified: commons/proper/vfs/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/src/changes/changes.xml?rev=1203475&r1=1203474&r2=1203475&view=diff
==============================================================================
--- commons/proper/vfs/trunk/src/changes/changes.xml (original)
+++ commons/proper/vfs/trunk/src/changes/changes.xml Fri Nov 18 03:26:40 2011
@@ -23,6 +23,9 @@
 
   <body>
     <release version="2.1" date="TBD" description="">
+      <action issue="VFS-385" dev="ggregory" type="update">
+        Add HTTP status code to HTTP file provider exception messages when available.
+      </action>
       <action issue="VFS-384" dev="ggregory" type="update">
         Update Apache Commons Net to 3.0.1 from 2.2 for FTP and SFTP providers.
       </action>



Mime
View raw message