I’m new to HttpServer.jl . I am starting out by modifying one of the examples which works fine -of course- but when I insert links to other files (specifically css, in this case) they’re sent with the wrong MIME type. I thought it was going to be easy to fix. I did the following:
(1) Test each requested file for the type and save that to a variable.
mime = mimetypes[type]
res.headers["Content-Type"] = mime
(4) And even
req.headers["Content-Type"] = mime …just because.
I print out the Content-Type and it is being set to
text/css but the browser complains saying that the css files are sent with the text/html mime and so even though they arrive the page does not render properly because the styles are not applied.
I would appreciate any help I can get, thanks!