From c75b8d2cca08fb09502bc6e4ae4e514d30bb1250 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= Date: Fri, 26 Jun 2026 06:43:15 +0200 Subject: [PATCH] stream_curl: strip parameters from content type It should only be assigned mime-type itself. I'm sure I had this change locally, but probably lost it during rebase somewhere. Fixes: #18187 --- stream/stream_curl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/stream/stream_curl.c b/stream/stream_curl.c index ca97f4f42e..a571e83cd6 100644 --- a/stream/stream_curl.c +++ b/stream/stream_curl.c @@ -948,8 +948,9 @@ static int curl_open(stream_t *s, const struct stream_open_args *args) char *content_type = NULL; curl_easy_getinfo(p->curl, CURLINFO_CONTENT_TYPE, &content_type); - if (content_type && content_type[0]) - s->mime_type = talloc_strdup(s, content_type); + bstr mime = bstr_strip(bstr_split(bstr0(content_type), ";", NULL)); + if (mime.len) + s->mime_type = bstrto0(s, mime); const char *effective_url = NULL; curl_easy_getinfo(p->curl, CURLINFO_EFFECTIVE_URL, &effective_url);