From debbugs-submit-bounces@debbugs.gnu.org Mon May 13 00:38:53 2024 Received: (at submit) by debbugs.gnu.org; 13 May 2024 04:38:53 +0000 Received: from localhost ([127.0.0.1]:58289 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s6NSf-00072k-2M for submit@debbugs.gnu.org; Mon, 13 May 2024 00:38:53 -0400 Received: from lists.gnu.org ([209.51.188.17]:57690) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s6NSc-00072c-L2 for submit@debbugs.gnu.org; Mon, 13 May 2024 00:38:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s6NSP-0006Cj-No for bug-mumi@gnu.org; Mon, 13 May 2024 00:38:41 -0400 Received: from sail-ipv4.us-core.com ([208.82.101.137]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1s6NSO-0007vO-0t for bug-mumi@gnu.org; Mon, 13 May 2024 00:38:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=2017; bh=aK59cDlZY1ka1O1 6I7xzpA9hVvq5usa8TqHkyC7qaYw=; h=date:subject:cc:to:from; d=lease-up.com; b=XIrHX+k1EdkB6z2tkpOLBZR6jFhxsmP/CjgxBcdvnIssKsZUgTg2 kN5YWNbzbPZG/49he//ORhMvi7rLgNrtRAM6VulWm5THKdB3sI7u9+pIIEhVZsq6mIIbG9 q2Pc/bQF6BGJ8IvODZAVE+UUeunhNdU1Uei/KwHtIwB3WGBUI= Received: by sail-ipv4.us-core.com (OpenSMTPD) with ESMTPSA id c1908a7a (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Mon, 13 May 2024 04:38:34 +0000 (UTC) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id d39734a4; Mon, 13 May 2024 04:38:34 +0000 (UTC) From: Felix Lechner To: bug-mumi@gnu.org Subject: [PATCH] Send HTTP headers with charset utf-8. Date: Sun, 12 May 2024 21:38:32 -0700 Message-ID: <20240513043832.6959-1-felix.lechner@lease-up.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=208.82.101.137; envelope-from=felix.lechner@us-core.com; helo=sail-ipv4.us-core.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: submit Cc: Felix Lechner X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) In most cases, providing HTTP headers with the charset is superior to (and has precedence over) the declaration in an HTML tag: https://stackoverflow.com/a/26032993 A preview of this code is live at patchwise.org. --- mumi/web/render.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mumi/web/render.scm b/mumi/web/render.scm index ad3ae0e..e867178 100644 --- a/mumi/web/render.scm +++ b/mumi/web/render.scm @@ -103,12 +103,12 @@ (define* (render-html sxml #:key (extra-headers '())) (values (append extra-headers - '((content-type . (text/html)))) + '((content-type . (text/html (charset . "utf-8"))))) (lambda (port) (sxml->html sxml port)))) (define (render-json json) - (values '((content-type . (application/json))) + (values '((content-type . (application/json (charset . "utf-8")))) (lambda (port) (scm->json json port)))) base-commit: 99416ed5c7d950eaf54d52023a2efd975bccac92 -- 2.41.0 From debbugs-submit-bounces@debbugs.gnu.org Tue May 14 19:15:36 2024 Received: (at control) by debbugs.gnu.org; 14 May 2024 23:15:36 +0000 Received: from localhost ([127.0.0.1]:41555 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s71Mt-000136-RU for submit@debbugs.gnu.org; Tue, 14 May 2024 19:15:36 -0400 Received: from sail-ipv4.us-core.com ([208.82.101.137]:44392) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s71Mr-000130-M4 for control@debbugs.gnu.org; Tue, 14 May 2024 19:15:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=2017; bh=TenCA0v6Aws8fw+ U8CTTQJoNeq70fR2OsxenIcyWt80=; h=date:cc:to:from; d=lease-up.com; b=QA sufy3hhjqxMPyiHl+qhb2QxwUenXEvnCz7ET9Jmpa13wvPgbvpT9mUXB6Qc1Tat4Mh/S8+ L1m2VSKk9f+sHYsXKK6ySDjDPmWNhWuJQGXDIZJQCvNQfLt1RTeqz6ymkq9m/SKrWYVYZK aQoeaL4VMovn68FeHkviCC4s26JyQ= Received: by localhost (OpenSMTPD) with ESMTPA id 5edbcb42 for ; Tue, 14 May 2024 23:15:31 +0000 (UTC) Delivered-To: control@patchwise.org DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=2017; bh=TenCA0v6Aws8fw+ U8CTTQJoNeq70fR2OsxenIcyWt80=; h=date:cc:to:from; d=lease-up.com; b=QA sufy3hhjqxMPyiHl+qhb2QxwUenXEvnCz7ET9Jmpa13wvPgbvpT9mUXB6Qc1Tat4Mh/S8+ L1m2VSKk9f+sHYsXKK6ySDjDPmWNhWuJQGXDIZJQCvNQfLt1RTeqz6ymkq9m/SKrWYVYZK aQoeaL4VMovn68FeHkviCC4s26JyQ= Received: by sail-ipv4.us-core.com (OpenSMTPD) with ESMTPSA id 790c1160 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO) for ; Tue, 14 May 2024 23:15:31 +0000 (UTC) From: Felix Lechner To: control@patchwise.org Date: Tue, 14 May 2024 16:15:31 -0700 Message-ID: <87a5ksvvcc.fsf@lease-up.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", 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 the administrator of that system for details. Content preview: block 69381 by 70906 70907 tags 69381 + patch thanks Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 1.8 MISSING_SUBJECT Missing Subject: header 0.2 NO_SUBJECT Extra score for no subject X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) block 69381 by 70906 70907 tags 69381 + patch thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 07 18:43:31 2024 Received: (at 70906-done) by debbugs.gnu.org; 7 Jun 2024 22:43:31 +0000 Received: from localhost ([127.0.0.1]:41278 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sFiJ1-0007Ts-8D for submit@debbugs.gnu.org; Fri, 07 Jun 2024 18:43:31 -0400 Received: from mugam.systemreboot.net ([139.59.75.54]:58772) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sFiIx-0007TW-Mp for 70906-done@debbugs.gnu.org; Fri, 07 Jun 2024 18:43:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=systemreboot.net; s=default; h=Content-Type:MIME-Version:Message-ID:Date: Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: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=u1diV9yakCuBJTnz+DhLEDg+/lbxhsxVRl2z14Q0IzU=; b=h5nj74RKhR4bAfYVF89ckG32kg TUJZd/rFVxagrmaZgct+/0t8/9ZZQ3xt5IWgl0LIH0Pe7EGFf7bks7AcOalO1Fb0YAsBtcBa6LT9y DFXV5dLMy4AYwi28x5FtzCqERN88Dm7aIx+ggKaau8E7gnfEY7O2E4eDiYy6VQq+bHoVbx/N+Oesa 9PlTzK9aTkC+eExRvdzc+YwWztWXpDoXYIqqwE+AUCNEKTfVl0tyH0tuxONyxJwYSLWv+J1OP07wa Ohwx5NV7sDwbj4DBkB8Bmie/2Fgkqy4s2BM1tCxOBSARnahJXiqU6xkVovP62XpfxX+54U8v9nQZn AMhH7y8Q==; Received: from [192.168.2.1] (port=44004 helo=localhost) by systemreboot.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.1) (envelope-from ) id 1sFiFY-0000HB-2Z; Fri, 07 Jun 2024 23:39:57 +0100 From: Arun Isaac To: 70906-done@debbugs.gnu.org Subject: Re: [PATCH] Send HTTP headers with charset utf-8. Date: Fri, 07 Jun 2024 23:43:03 +0100 Message-ID: <87v82kfk7c.fsf@systemreboot.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 70906-done Cc: Felix Lechner X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Applied, thanks! I made the following modifications: - The application/json MIME type does not require a charset. See https://stackoverflow.com/questions/9254891/what-does-content-type-application-json-charset-utf-8-really-mean So, I dropped that part. - I removed the Content-Type meta tag from the HTML. From unknown Sat Aug 09 04:59:23 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 06 Jul 2024 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator