From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Arun Isaac Newsgroups: gmane.lisp.guile.bugs Subject: bug#30076: [PATCH] web: Recognize JSON content type as text. Date: Fri, 02 Feb 2018 13:01:34 +0530 Message-ID: References: <20180111053117.4597-1-arunisaac@systemreboot.net> <87y3kevh53.fsf@netris.org> <87lggeva1b.fsf@netris.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1517589419 2115 195.159.176.226 (2 Feb 2018 16:36:59 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 2 Feb 2018 16:36:59 +0000 (UTC) Cc: 30076@debbugs.gnu.org To: Mark H Weaver Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Fri Feb 02 17:36:55 2018 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eheKZ-0008Pw-7N for guile-bugs@m.gmane.org; Fri, 02 Feb 2018 17:36:51 +0100 Original-Received: from localhost ([::1]:39273 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eheMa-0000ID-7m for guile-bugs@m.gmane.org; Fri, 02 Feb 2018 11:38:56 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52034) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ehdEG-00043d-La for bug-guile@gnu.org; Fri, 02 Feb 2018 10:29:53 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ehdDC-0003T9-Hk for bug-guile@gnu.org; Fri, 02 Feb 2018 10:26:16 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:46268) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ehdDC-0003JP-4K for bug-guile@gnu.org; Fri, 02 Feb 2018 10:25:10 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ehVpK-0000dl-GH for bug-guile@gnu.org; Fri, 02 Feb 2018 02:32:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Arun Isaac Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Fri, 02 Feb 2018 07:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30076 X-GNU-PR-Package: guile X-GNU-PR-Keywords: patch Original-Received: via spool by 30076-submit@debbugs.gnu.org id=B30076.15175567172450 (code B ref 30076); Fri, 02 Feb 2018 07:32:02 +0000 Original-Received: (at 30076) by debbugs.gnu.org; 2 Feb 2018 07:31:57 +0000 Original-Received: from localhost ([127.0.0.1]:53319 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ehVpF-0000dS-EE for submit@debbugs.gnu.org; Fri, 02 Feb 2018 02:31:57 -0500 Original-Received: from vultr.systemreboot.net ([45.77.148.100]:42750) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ehVpD-0000dA-1Y for 30076@debbugs.gnu.org; Fri, 02 Feb 2018 02:31:56 -0500 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: References:In-Reply-To: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:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=HyBHRiQ7xjVUyN6MVZgkroEgcQxIZZSSPUj4MJaXsbg=; b=bgV6IRfl6dfgJO5pNZULFRC7I B3bFueT0oE1D/VjDWvFFzTYgE2eELCa01J9flr1p107c7Mbq20kRiADeTuJC7AXeccu3v87D0E3oe MaYsoawb8ys/xyHYzonUMqhPiYj5HMwFePSzcmd+c99nSW5fcyCtIMedBeofoKD9hFDX4=; Original-Received: from [14.139.128.15] (helo=steel) by systemreboot.net with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90) (envelope-from ) id 1ehVp3-00080b-LY; Fri, 02 Feb 2018 13:01:46 +0530 In-Reply-To: <87lggeva1b.fsf@netris.org> X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -0.0 (/) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.org gmane.lisp.guile.bugs:8996 Archived-At: > Having looked into this a bit more, I wonder if Guile should even try to > set the port encoding itself. As far as I can tell, there's no way to > know the encoding of the response payload in the general case, without > knowledge of the specific MIME media type. We could teach Guile about > "application/json", but if we follow that path, it would lead to us > teaching Guile's web library about more media types over time, but we > cannot hope to know about all of them. > Since it's not feasible for Guile to reliably choose the right encoding > for arbitrary media types, perhaps it would be better for Guile to > explicitly say that it's the application programmer's job to set the > encoding of the port, if it contains textual data. "application/json" is common enough that it would be convenient for the application programmer to have Guile know about it. But, as a Guile maintainer, this is your call. I don't have strong opinions this way or that.