From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 30627 invoked from network); 28 Aug 2023 07:40:09 -0000 Received: from lists.zx2c4.com (165.227.139.114) by inbox.vuxu.org with ESMTPUTF8; 28 Aug 2023 07:40:09 -0000 Received: by lists.zx2c4.com (ZX2C4 Mail Server) with ESMTP id c10a6d00; Mon, 28 Aug 2023 07:39:51 +0000 (UTC) Return-Path: Received: from mail.ashbysoft.com (mail.ashbysoft.com [81.187.239.221]) by lists.zx2c4.com (ZX2C4 Mail Server) with ESMTPS id 21bfee12 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Mon, 28 Aug 2023 07:39:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ashbysoft.com; s=phil; h=Content-Transfer-Encoding:MIME-Version:Message-ID: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=FEAduw/SzHi/Yy1ZukbMbkBqdyC8D1N+bxrd+soil4s=; t=1693208391; x=1695627591; b=Xsyz9vBrc0mA5+zLYYjCzJhyhXBSHBuZ0OFczEfJytqv091A1hJRqUWRax4+bK1G/sYj61hQ+Wg bqMkJ0jbjDTsTYZPCGnoZvX9t46k1g3W+panJ8DlLrjNicioUxp0ZezE/fzrnO8iDvhN0vc5wPXj4 naDS3ggymxuKiyU0nqrSGTVLARQqUnF5QQLDlobZRB0/Mvk94/YBeql8/ipEs+QgXNWjUyZfyQXdW hnsy3AMQw5I2povxSlVz1o+C4L51WwkjsqE9eHiiEFc18QzIrP2z3qdCi8zFyft8+llPHhOqkRw8K v6J6ditnPpTIdjJJFMjBcaJ/0QHfAilvlbLg==; Received: from cpc104200-ipsw4-2-0-cust638.7-4.cable.virginm.net ([82.30.82.127] helo=martin-pinebook.lan) by mail.ashbysoft.com with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qaWqk-001WCF-22; Mon, 28 Aug 2023 08:39:50 +0100 From: Martin Ashby To: cgit@lists.zx2c4.com Cc: Martin Ashby Subject: [PATCH] ui-snapshot: Remove charset from content-type header Date: Mon, 28 Aug 2023 08:39:14 +0100 Message-ID: <20230828073945.311406-1-martin@ashbysoft.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam_score: -2.9 X-Spam_score_int: -28 X-Spam_bar: -- X-Spam_report: Spam detection software, running on the system "timmy-iii", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: The charset is only applicable for text type media types, which snapshots are not. Including the charset in non-text media types also breaks some client software. Signed-off-by: Martin Ashby --- ui-snapshot.c | 2 ++ 1 file changed, 2 insertions(+) Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: cgit@lists.zx2c4.com X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: List for cgit developers and users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: cgit-bounces@lists.zx2c4.com Sender: "CGit" The charset is only applicable for text type media types, which snapshots are not. Including the charset in non-text media types also breaks some client software. Signed-off-by: Martin Ashby --- ui-snapshot.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ui-snapshot.c b/ui-snapshot.c index 18361a6..9eb1ed7 100644 --- a/ui-snapshot.c +++ b/ui-snapshot.c @@ -169,6 +169,8 @@ static int make_snapshot(const struct cgit_snapshot_format *format, ctx.page.etag = oid_to_hex(&oid); ctx.page.mimetype = xstrdup(format->mimetype); ctx.page.filename = xstrdup(filename); + // A charset parameter isn't applicable for binary downloads + ctx.page.charset = NULL; cgit_print_http_headers(); init_archivers(); format->write_func(hex, prefix); -- 2.41.0