Skip to content

Commit

Permalink
Fix czf temp file issue in Traffic Router (#8008)
Browse files Browse the repository at this point in the history
Co-authored-by: Parthiban, Jagan <[email protected]>
  • Loading branch information
rimashah25 and jparth603 authored May 14, 2024
1 parent 66771c1 commit 00ec914
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- [#7933](https://github.com/apache/trafficcontrol/pull/7933), [#8005](https://github.com/apache/trafficcontrol/pull/8005) *Traffic Portal v2*: Update NodeJS version to 18.

### Fixed
- [#8008](https://github.com/apache/trafficcontrol/pull/8008) *Traffic Router* Fix czf temp file deletion issue.
- [#7998](https://github.com/apache/trafficcontrol/pull/7998) *Traffic Portalv2* Fixed (create and update) page titles across every feature
- [#7984](https://github.com/apache/trafficcontrol/pull/7984) *Traffic Ops* Fixed TO Client cert authentication with respect to returning response cookie.
- [#7957](https://github.com/apache/trafficcontrol/pull/7957) *Traffic Ops* Fix the incorrect display of delivery services assigned to ORG servers.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -376,16 +376,19 @@ protected File downloadDatabase(final String url, final File existingDb) throws
eTag = conn.getHeaderField("ETag");
if (((HttpURLConnection) conn).getResponseCode() == HttpURLConnection.HTTP_NOT_MODIFIED) {
LOGGER.info("[" + getClass().getSimpleName() + "] " + url + " not modified since our existing database's last update time of " + new Date(existingLastModified));
outputFile.delete();
return existingDb;
}
} else if (dbURL.getProtocol().equals("file") && conn.getLastModified() > 0 && conn.getLastModified() <= existingLastModified) {
LOGGER.info("[" + getClass().getSimpleName() + "] " + url + " not modified since our existing database's last update time of " + new Date(existingLastModified));
outputFile.delete();
return existingDb;
}

IOUtils.copy(sourceCompressed ? new GZIPInputStream(in) : in, out);
}


return outputFile;
}

Expand Down

0 comments on commit 00ec914

Please sign in to comment.