two days, three releases, latest being: [metosin/reitit "0.5.9"]
- https://github.com/metosin/reitit/blob/master/CHANGELOG.md. Thanks to all contributors!
works great!
Hi! I am having a problem here. A client is sending data to my reitit-server. It fails with 500 and there is an error log com.fasterxml.jackson.core.JsonParseException: Illegal character ((CTRL-CHAR, code 31)): only regular white space (\r, \n, \t) is allowed between tokens
. The payload is sent by the client to the server with gzip compression.
Is the problem here that my reitit-server does not decompress a gzipped payload?
Is there a way to dump the payload any further? In the reitit output it is only shown as :body #<org.eclipse.jetty.server.HttpInputOverHTTP@408d23e HttpInputOverHTTP@408d23e[c=0,q=0,[0]=null,s=STREAM]>
Is amalloy/ring-gzip-middleware
sufficient to decompress client payloads?
Is it set correctly to do that in this route-opts?
(def route-opts
{:reitit.middleware/transform dev/print-request-diffs ;; pretty diffs
;;:validate spec/validate ;; enable spec validation for route data
;;:reitit.spec/wrap spell/closed ;; strict top-level validation
;;:exception pretty/exception
:data {:coercion reitit.coercion.spec/coercion
:muuntaja muuntaja-instance
:middleware [gzip/wrap-gzip
swagger/swagger-feature
parameters/parameters-middleware
muuntaja/format-negotiate-middleware
muuntaja/format-response-middleware
;;exception/exception-middleware
muuntaja/format-request-middleware
coercion/coerce-response-middleware
coercion/coerce-request-middleware
multipart/multipart-middleware]}})
@timok looks legit. Using a reverse proxy for that might be much faster.
hmm, :thinking_face: a revproxy for gzip then? worth a try. thanks
@timok nginx works really well with that