summaryrefslogtreecommitdiff
path: root/usr.sbin/httpd/httpd.c
diff options
context:
space:
mode:
authorSebastian Benoit <benno@cvs.openbsd.org>2022-09-02 07:38:15 +0000
committerSebastian Benoit <benno@cvs.openbsd.org>2022-09-02 07:38:15 +0000
commitb95273d1b73c7259f075a0e730c236313fb1ce98 (patch)
treec8baa6366ae911bacf0133d11d6d37519ed84348 /usr.sbin/httpd/httpd.c
parent9b6d7de948017a16721bf5ca1df270a39ef0d28a (diff)
Make newer mime type definitions take precedence over existing ones.
Patch from Ben Fuller <ben -AT- bvnf -DOT- space>, helped along by florian@ ok florian@ and some mumblings from claudio who does not want okays in httpd.
Diffstat (limited to 'usr.sbin/httpd/httpd.c')
-rw-r--r--usr.sbin/httpd/httpd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/httpd/httpd.c b/usr.sbin/httpd/httpd.c
index 2acecd1732f..af863cf2710 100644
--- a/usr.sbin/httpd/httpd.c
+++ b/usr.sbin/httpd/httpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: httpd.c,v 1.72 2022/03/02 11:10:43 florian Exp $ */
+/* $OpenBSD: httpd.c,v 1.73 2022/09/02 07:38:14 benno Exp $ */
/*
* Copyright (c) 2014 Reyk Floeter <reyk@openbsd.org>
@@ -1080,9 +1080,9 @@ media_add(struct mediatypes *types, struct media_type *media)
struct media_type *entry;
if ((entry = RB_FIND(mediatypes, types, media)) != NULL) {
- log_debug("%s: duplicated entry for \"%s\"", __func__,
+ log_debug("%s: entry overwritten for \"%s\"", __func__,
media->media_name);
- return (NULL);
+ media_delete(types, entry);
}
if ((entry = malloc(sizeof(*media))) == NULL)