Use case: I would like to serve UTF-8 encoded *.txt files.
When I use the following server:
:- use_module(library(http/thread_httpd)).
:- use_module(library(http/http_unix_daemon)).
:- use_module(library(http/http_files)).
:- http_handler(root(.), http_reply_from_files(., []), [prefix]).
then I can fetch *.txt files. However, the content-type in responses is:
Content-Type: text/plain
whereas I would like to get responses such as:
Content-Type: text/plain; charset=UTF-8
Is there an easy way to configure the SWI infrastructure to specify charset=UTF-8 when serving *.txt files? Alternatively, would you please consider adding such a feature? Thank you!
Use case: I would like to serve UTF-8 encoded
*.txtfiles.When I use the following server:
then I can fetch
*.txtfiles. However, the content-type in responses is:whereas I would like to get responses such as:
Is there an easy way to configure the SWI infrastructure to specify
charset=UTF-8when serving*.txtfiles? Alternatively, would you please consider adding such a feature? Thank you!