Re: 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/

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: 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/

sebb-2-2
On 18 November 2011 03:26,  <[hidden email]> wrote:
> 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)

Please provide a reason for the change.

You can update the log entry after the fact.

> 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>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: 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/

garydgregory
Oops, done: [VFS-385] Add HTTP status code to HTTP file provider exception
messages when available.

Thank you Sebb! Good catch.

Gary

On Fri, Nov 18, 2011 at 7:04 AM, sebb <[hidden email]> wrote:

> On 18 November 2011 03:26,  <[hidden email]> wrote:
> > 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)
>
> Please provide a reason for the change.
>
> You can update the log entry after the fact.
>
> > 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>
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


--
E-Mail: [hidden email] | [hidden email]
JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory