You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Previously, it was the case that running lein new pedestal-service helloworld and making src/helloworld/service.clj match the following would result in the / route serving "Hello world" as normal browser-friendly response.
I thought the default used to be text/plain. Are you suggesting that or text/html as the default? I'm for the latter since most of us render html not plain text
This was a bug that bit me early on, so I am partial to it :-)
As far as I can see, ring.util.response/response is returning an empty header whereas io.pedestal.service.http/html-body is using ring.util.response/content-type to explicitly set the content-type to "text/html;charset=UTF-8". Would it make sense to do the same within ring.util.response/response function (pass it through content-type with a suitable default content-type)?
I know this would work because if I change the definition of home-page this way, the bug ceases to exist:
Talking with @timewald it seems like we may need our own implementation of content-type-response. (I should also write a failing test in the ring middlewares test ns when I do that.)
Previously, it was the case that running
lein new pedestal-service helloworld
and makingsrc/helloworld/service.clj
match the following would result in the/
route serving "Hello world" as normal browser-friendly response.Now, without the addition of an
html-body
interceptor as below the/
route is served asapplication/octet-stream
.It should probably be the case that by-default content is not served as an octet-stream.
The text was updated successfully, but these errors were encountered: