Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Add charset=... for all text/* documents #42

Closed
daapp opened this Issue · 10 comments

2 participants

Alexander Danilov Hans Hübner
Alexander Danilov

I found a bug in static file managment.

If I start hunchentoot with:
(setf acceptor (make-instance 'hunchentoot:easy-acceptor
:port port
:document-root (truename "./static/")))
(start acceptor)

then hunchentoot return all .html files from ./static/ with Content-Type: text/html; charset=utf-8,
but other text/
files, like .js it returns without charset=... , and there is no way to change this.
If such .js file contains utf-8 text, than browser display it incorrectly.

Hans, can you fix this or may be advice how to do it, and i will try myself?

Hans Hübner
Owner
Hans Hübner
Owner
Hans Hübner
Owner

Actually, it would be better to add the charset= specification in the MIME-TYPE function, not in HANDLE-STATIC-FILE.

Alexander Danilov
Hans Hübner
Owner
Alexander Danilov
Hans Hübner
Owner
Alexander Danilov
Hans Hübner
Owner
Alexander Danilov

You are right, I was checking on json handlers, so I find no charset in content-type. Sorry.

Alexander Danilov daapp closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.