summaryrefslogtreecommitdiff
path: root/src/io_url.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/io_url.c')
-rw-r--r--src/io_url.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/io_url.c b/src/io_url.c
index 93728aa..d61dd52 100644
--- a/src/io_url.c
+++ b/src/io_url.c
@@ -103,6 +103,7 @@ static struct apk_istream *apk_istream_fetch(const char *url, time_t since)
{
struct apk_fetch_istream *fis = NULL;
struct url *u;
+ char *flags = "Ci";
fetchIO *io = NULL;
int rc = -EIO;
@@ -117,8 +118,12 @@ static struct apk_istream *apk_istream_fetch(const char *url, time_t since)
goto err;
}
- u->last_modified = since;
- io = fetchXGet(u, &fis->urlstat, (apk_force & APK_FORCE_REFRESH) ? "Ci" : "i");
+ if (since != APK_ISTREAM_FORCE_REFRESH) {
+ u->last_modified = since;
+ flags = "i";
+ }
+
+ io = fetchXGet(u, &fis->urlstat, flags);
if (!io) {
rc = fetch_maperror(fetchLastErrCode);
goto err;
@@ -147,8 +152,3 @@ struct apk_istream *apk_istream_from_fd_url_if_modified(int atfd, const char *ur
return apk_istream_from_file(atfd, apk_url_local_file(url));
return apk_istream_fetch(url, since);
}
-
-struct apk_istream *apk_istream_from_url_gz(const char *file)
-{
- return apk_istream_gunzip(apk_istream_from_url(file));
-}