bug-guile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#30076: [PATCH] web: Recognize JSON content type as text.


From: Arun Isaac
Subject: bug#30076: [PATCH] web: Recognize JSON content type as text.
Date: Fri, 02 Feb 2018 13:01:34 +0530

> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]