Bugs item #1802899, was opened at 2007-09-26 16:07
Message generated for change (Comment added) made by cchan_qa
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1802899&group_id=31650

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Tasks
Group: 0.85
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: ahm4711 (ahm4711)
Assigned to: Charles Chan (cchan_qa)
Summary: get usetimestamp="true" always download file

Initial Comment:
When setting usetimestamp to true, behaviour is not as described in the 
documentation. The requested file is always beeing download, allthougth the 
files timestamp has not changed on the server.
Just try below code twice and you will see that it "faq.html" is downloaded the 
second time as well (which should not happen).



        <target name="Bug">
                <get verbose="true" usetimestamp="true" 
src="http://nant.sourceforge.net/faq.html"; dest="c:/faq.html" />
        <target name="GetZipAndInstall">




I had a look in the code and when changing the code from:

httpRequest.IfModifiedSince = gmtTime;

to

httpRequest.IfModifiedSince = fileLastModified;

in   private WebRequest GetWebRequest(string url, DateTime fileLastModified)

then behaviour seems to be correct! In any case I do not understand why the 
"gmtTime" hack there is needed.






----------------------------------------------------------------------

>Comment By: Charles Chan (cchan_qa)
Date: 2010-04-22 04:09

Message:
Fixed. Checked into CVS. Fix "usetimestamp" to only download new file if
the timestamp for the resource has changed on the server.

src/NAnt.Core/Tasks/GetTask.cs

----------------------------------------------------------------------

Comment By: Charles Chan (cchan_qa)
Date: 2010-04-19 04:34

Message:
Need to verify:
1) When a file is downloaded, the local file timestamp is set to the
remote timestamp.
2) When the file is downloaded, check if the file timestamp on the server
is newer.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1802899&group_id=31650

------------------------------------------------------------------------------
_______________________________________________
nant-developers mailing list
nant-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to