yada

mjmeintjes 2019-02-08T10:26:42.412800Z

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?

malcolmsparks 2019-02-08T10:28:22.414300Z

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

malcolmsparks 2019-02-08T10:28:45.414800Z

My fix is released, it was fairly simple.

mjmeintjes 2019-02-08T10:32:39.415200Z

yada {:mvn/version"1.2.16"}

mjmeintjes 2019-02-08T10:34:37.416Z

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

malcolmsparks 2019-02-08T11:11:11.417400Z

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

borkdude 2019-02-08T12:12:44.418800Z

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:

<http://localhost:3700/api/help/confluence/settings/foo/bar>
<http://localhost:3700/api/help/confluence/settings/foo/bar%2Fbar>
Should that work, or maybe I should organize it differently

borkdude 2019-02-08T12:13:15.419300Z

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

borkdude 2019-02-08T12:45:39.419600Z

it’s probably not supported: https://stackoverflow.com/questions/3235219/urlencoded-forward-slash-is-breaking-url