[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] web: Treat 'application/json' and similar as text.
From: |
Marius Bakke |
Subject: |
[PATCH] web: Treat 'application/json' and similar as text. |
Date: |
Tue, 5 Sep 2023 14:05:15 +0800 |
* module/web/response.scm (text-content-type?): Add check for /json and +json.
---
module/web/response.scm | 2 ++
1 file changed, 2 insertions(+)
diff --git a/module/web/response.scm b/module/web/response.scm
index 4ac4d74ca..394aac83c 100644
--- a/module/web/response.scm
+++ b/module/web/response.scm
@@ -182,6 +182,8 @@ reason phrase for the response's code."
represents a textual type such as `text/plain'."
(let ((type (symbol->string type)))
(or (string-prefix? "text/" type)
+ (string-suffix? "/json" type)
+ (string-suffix? "+json" type)
(string-suffix? "/xml" type)
(string-suffix? "+xml" type))))
--
2.41.0
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] web: Treat 'application/json' and similar as text.,
Marius Bakke <=