unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Arun Isaac <arunisaac@systemreboot.net>
To: Mark H Weaver <mhw@netris.org>
Cc: 30076@debbugs.gnu.org
Subject: bug#30076: [PATCH] web: Recognize JSON content type as text.
Date: Fri, 02 Feb 2018 13:01:34 +0530	[thread overview]
Message-ID: <cu7tvuzzw2x.fsf@systemreboot.net> (raw)
In-Reply-To: <87lggeva1b.fsf@netris.org>


> 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.





      reply	other threads:[~2018-02-02  7:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-11  5:31 bug#30076: [PATCH] web: Recognize JSON content type as text Arun Isaac
2018-01-31  3:31 ` Mark H Weaver
2018-01-31  6:04   ` Mark H Weaver
2018-02-02  7:31     ` Arun Isaac [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cu7tvuzzw2x.fsf@systemreboot.net \
    --to=arunisaac@systemreboot.net \
    --cc=30076@debbugs.gnu.org \
    --cc=mhw@netris.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).