Skip to Content.
Sympa Menu

notify-dpml - svn commit: r1705 - development/main/home/transit/handler/src/main/net/dpml/transit/artifact

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: mcconnell AT netcompartner.com
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: svn commit: r1705 - development/main/home/transit/handler/src/main/net/dpml/transit/artifact
  • Date: Thu, 03 Feb 2005 07:14:20 +0100

Author: mcconnell
Date: Thu Feb 3 07:14:18 2005
New Revision: 1705

Modified:

development/main/home/transit/handler/src/main/net/dpml/transit/artifact/NetworkLoader.java
Log:
Move setIfModifiedSince logic under the scope of a HttpURLConnection (becuase
this method will throw an illegal state exception if the source repository is
a file url.

Modified:
development/main/home/transit/handler/src/main/net/dpml/transit/artifact/NetworkLoader.java
==============================================================================
---
development/main/home/transit/handler/src/main/net/dpml/transit/artifact/NetworkLoader.java
(original)
+++
development/main/home/transit/handler/src/main/net/dpml/transit/artifact/NetworkLoader.java
Thu Feb 3 07:14:18 2005
@@ -103,9 +103,9 @@
{
String sourcePath = url.getPath();
File sourceFile = new File( sourcePath );
-
if( destination.exists() )
{
+
if( destination.lastModified() >=
sourceFile.lastModified() )
{
return destination.toURL();
@@ -141,13 +141,13 @@
//modify the headers
//NB: things like user authentication could go in here too.

- if( timestamping && hasTimestamp )
- {
- connection.setIfModifiedSince( localTimestamp );
- }
-
if( connection instanceof HttpURLConnection )
{
+ if( timestamping && hasTimestamp )
+ {
+ connection.setIfModifiedSince( localTimestamp );
+ }
+
//next test for a 304 result (HTTP only)
HttpURLConnection httpConnection = ( HttpURLConnection )
connection;




  • svn commit: r1705 - development/main/home/transit/handler/src/main/net/dpml/transit/artifact, mcconnell, 02/03/2005

Archive powered by MHonArc 2.6.24.

Top of Page