Skip to content
Snippets Groups Projects
Unverified Commit 7c54e32e authored by Federico Tedin's avatar Federico Tedin Committed by GitHub
Browse files

Fix incorrect Content-Type "applicaton/json" (#12461)

parent de6ea1a4
No related branches found
No related tags found
No related merge requests found
...@@ -195,7 +195,7 @@ ...@@ -195,7 +195,7 @@
ManyToManyChannel ManyToManyChannel
(send* [input-chan _ respond _] (send* [input-chan _ respond _]
(respond (assoc (response/response input-chan) (respond (assoc (response/response input-chan)
:content-type "applicaton/json; charset=utf-8" :content-type "application/json; charset=utf-8"
:status 202)))) :status 202))))
;; everthing in this namespace is deprecated! ;; everthing in this namespace is deprecated!
......
...@@ -257,7 +257,7 @@ ...@@ -257,7 +257,7 @@
Minimal example: Minimal example:
(streaming-response {:content-type \"applicaton/json; charset=utf-8\"} [os canceled-chan] (streaming-response {:content-type \"application/json; charset=utf-8\"} [os canceled-chan]
(write-something-to-stream! os)) (write-something-to-stream! os))
`f` should block until it is completely finished writing to the stream, which will be closed thereafter. `f` should block until it is completely finished writing to the stream, which will be closed thereafter.
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
(defmethod i/stream-options :json (defmethod i/stream-options :json
[_] [_]
{:content-type "applicaton/json; charset=utf-8" {:content-type "application/json; charset=utf-8"
:headers {"Content-Disposition" (format "attachment; filename=\"query_result_%s.json\"" :headers {"Content-Disposition" (format "attachment; filename=\"query_result_%s.json\""
(u.date/format (t/zoned-date-time)))}}) (u.date/format (t/zoned-date-time)))}})
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
(defmethod i/stream-options :api (defmethod i/stream-options :api
[stream-type] [stream-type]
{:content-type "applicaton/json; charset=utf-8"}) {:content-type "application/json; charset=utf-8"})
(defn- map->serialized-json-kvs (defn- map->serialized-json-kvs
"{:a 100, :b 200} ; -> \"a\":100,\"b\":200" "{:a 100, :b 200} ; -> \"a\":100,\"b\":200"
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
response {:status 200 response {:status 200
:headers {} :headers {}
:body input-chan :body input-chan
:content-type "applicaton/json; charset=utf-8"}] :content-type "application/json; charset=utf-8"}]
;; and keep it from getting [re]created. ;; and keep it from getting [re]created.
(with-redefs [async-response/async-keepalive-channel identity] (with-redefs [async-response/async-keepalive-channel identity]
(ring.protocols/write-body-to-stream output-chan response os)) (ring.protocols/write-body-to-stream output-chan response os))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment