[
http://jira.codehaus.org/browse/WAGON-126?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Brett Porter moved WAGONHTTP-5 to WAGON-126:
--------------------------------------------
Affects Version/s: (was: 1.0-alpha-3)
Fix Version/s: (was: 1.0-beta-2)
1.0-beta-2
Key: WAGON-126 (was: WAGONHTTP-5)
Project: Maven Wagon (was: wagon-http)
> The getIfNewer method fails to work if file doesn't exist locally and the
> Last-Modified header isn't sent by the server
> -----------------------------------------------------------------------------------------------------------------------
>
> Key: WAGON-126
> URL: http://jira.codehaus.org/browse/WAGON-126
> Project: Maven Wagon
> Issue Type: Bug
> Reporter: Kohsuke Kawaguchi
> Assignee: Brett Porter
> Fix For: 1.0-beta-2
>
>
> The code doesn't work correctly if the following two conditions are met
> simultaneously:
> (i) the local file doesn't exist --- hence the timestamp parameter is 0
> (ii) the remote server doesn't send the "Last-Modified" header.
> Since the lastModified variable is initialized to 0 in line 355, if the above
> two conditions are met,
> the following if statement at line 371 evaluates to false:
> * if ( timestamp < lastModified )
> {
> retValue = true;
> and therefore the file won't be downloaded, causing the dependency to fail.
> This used to work with Maven 1.0.2.
> To fix this problem, initialize the lastModified variable to 1.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira