fix extension matching

This commit is contained in:
Christian Grothoff 2019-12-08 22:50:04 +01:00
parent 7ad562af55
commit c40243bb12
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
2 changed files with 10 additions and 9 deletions

View File

@ -311,14 +311,14 @@ load_terms (const char *path,
const char *ext;
const char *mime;
} mm[] = {
{ .ext = "html", .mime = "text/html" },
{ .ext = "htm", .mime = "text/html" },
{ .ext = "txt", .mime = "text/plain" },
{ .ext = "pdf", .mime = "application/pdf" },
{ .ext = "jpg", .mime = "image/jpeg" },
{ .ext = "jpeg", .mime = "image/jpeg" },
{ .ext = "png", .mime = "image/png" },
{ .ext = "gif", .mime = "image/gif" },
{ .ext = ".html", .mime = "text/html" },
{ .ext = ".htm", .mime = "text/html" },
{ .ext = ".txt", .mime = "text/plain" },
{ .ext = ".pdf", .mime = "application/pdf" },
{ .ext = ".jpg", .mime = "image/jpeg" },
{ .ext = ".jpeg", .mime = "image/jpeg" },
{ .ext = ".png", .mime = "image/png" },
{ .ext = ".gif", .mime = "image/gif" },
{ .ext = NULL, .mime = NULL }
};
const char *ext = strrchr (name, '.');

View File

@ -26,7 +26,8 @@ PORT = 8083
[exchange]
TERMS_ETAG = 0
TERMS_DIR = /home/grothoff/share/taler-exchange/tos/
# how long is one signkey valid?
signkey_duration = 4 weeks