This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-02-08
Channels
- # announcements (2)
- # aws (1)
- # beginners (134)
- # calva (26)
- # cider (48)
- # cljdoc (41)
- # cljs-dev (12)
- # clojure (178)
- # clojure-brasil (1)
- # clojure-europe (16)
- # clojure-italy (30)
- # clojure-nl (13)
- # clojure-spec (118)
- # clojure-uk (81)
- # clojurescript (209)
- # community-development (77)
- # cursive (7)
- # datomic (23)
- # duct (6)
- # emacs (15)
- # events (2)
- # figwheel (13)
- # figwheel-main (18)
- # fulcro (4)
- # jackdaw (4)
- # jobs (6)
- # jobs-discuss (6)
- # kaocha (2)
- # lein-figwheel (3)
- # off-topic (4)
- # other-languages (22)
- # pathom (2)
- # pedestal (9)
- # perun (10)
- # portkey (1)
- # re-frame (41)
- # reagent (6)
- # reitit (4)
- # remote-jobs (1)
- # ring-swagger (6)
- # rum (5)
- # shadow-cljs (300)
- # sql (3)
- # test-check (6)
- # testing (7)
- # vim (1)
- # yada (9)
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 differentlythe last two fragments are IDS which I cannot guarantee they will never have a slash
it’s probably not supported: https://stackoverflow.com/questions/3235219/urlencoded-forward-slash-is-breaking-url