yada 2019-02-08

@mjmeintjes has joined the channel

I'm struggling to get a basic POST handler working. It seems that my content-type header does not include a charset, which means that

(codec/form-decode
                    body-string
                    (req/character-encoding (:request ctx)))
returns {nil nil}. I fixed this by creating an interceptor that adds ";charset=utf-8" to the content-type (`(update-in ctx [:request :headers "content-type"] str ";charset=utf-8")`), but this can't be the right way to do it. What am I missing?

What version of yada? I ask because I hit the same issue myself recently and made the charset default to the platform charset.

My fix is released, it was fairly simple.

yada {:mvn/version"1.2.16"}

The problem seems to be that if (req/character-encoding (:request ctx)) returns nil, then the form-decode fails.

It's fixed in 1.3.0. Your interceptor approach is a valid workaround for the time being

I have an issue with a route that expects part of the PATH to have an url-encoded slash which should not be treated as separate fragments:



Should that work, or maybe I should organize it differently

the last two fragments are IDS which I cannot guarantee they will never have a slash