diff options
author | Christian Hesse <mail@eworm.de> | 2013-11-05 10:02:26 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2013-11-05 10:02:26 +0100 |
commit | ea57bfda4fa7f7f038a42d56ad27650be3becd82 (patch) | |
tree | f9e1bb7fc41898c3afb750793617988b8c8a17b7 | |
parent | 8551d4885a4bf5997e0aa97852719168ee8d5457 (diff) | |
download | paccache-ea57bfda4fa7f7f038a42d56ad27650be3becd82.tar.gz paccache-ea57bfda4fa7f7f038a42d56ad27650be3becd82.tar.zst |
handle db file signatures correctly
-rw-r--r-- | pacredir.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -299,8 +299,9 @@ static int ahc_echo(void * cls, struct MHD_Connection * connection, const char * /* clear context pointer */ *ptr = NULL; - /* process db file request */ - if (strlen(basename) > 3 && strcmp(basename + strlen(basename) - 3, ".db") == 0) { + /* process db file (and signature) request */ + if ((strlen(basename) > 3 && strcmp(basename + strlen(basename) - 3, ".db") == 0) || + (strlen(basename) > 7 && strcmp(basename + strlen(basename) - 7, ".db.sig") == 0)) { /* get timestamp of local file */ filename = malloc(strlen(SYNCPATH) + strlen(basename) + 2); sprintf(filename, SYNCPATH "/%s", basename); |