You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Steve Loughran <st...@iseran.com> on 2000/07/21 22:18:07 UTC

[patch] Get.java

Okay, here is a patch to Get.java which adds an optional timestamp for
controlling HTTP downloads.

When the useTimestamp flag is set, then the local file time is used for
controlling download -and any file downloaded has its time set to that of
the remote destination. [That is, if the download information includes a
file time *and* that time is greater than 1/1/70, which can't be
distinguished from 'no timestamp', and the JVM is >= Java1.2)

I have also added the build.xml file to test it, which is somewhat fiddlier
than usual due to the need to test against a web server. And the three test
files I use have been stuck up on an externally accessible web server to
round everything off. Once (if) the patch is applied to Get.java, I'll
submit some documentation changes to match.

An FTP/HTTP PUT counterpart is likely only when I need to use it myself
enough to justify the effort.

-Steve

----- Original Message -----
From: "Stefan Bodewig" <bo...@bost.de>
To: <an...@jakarta.apache.org>
Sent: Friday, July 14, 2000 02:38
Subject: Re: [patch] Get.java (was Re: Time-based dependencies)

>  SL> 2. Touching the file after download.
>
> Take a look at Expand or Untar for examples of abusing Touch for this.
>
> Stefan
>

You know, there is indeed a fair amount of touch abuse going on. I believe
the touch functionality should really be moved into the Project class at
some point in time.