mchttpd LiveCode server do not load images
Posted: Mon Oct 15, 2018 4:16 am
Hi All,
Take a look at this screenshot. It shows the same webpage
loaded from mchttpd and opened directly in the browser:
Test this by yourself. Download the stack from:
http://fourthworld.net/lc/mchttpd-4W.zip
Open the stack, click start server and load this webpage
in the browser: http://127.0.0.1:8080/index.html
Why loading this webpage using mchttpd does not show
all images?
Now load the same index.html directly from hard disk,
(not using mchttpd) and the internet browser show all
images correctly.
Notice that when I load an image directly, through mchttpd
the browser shows the binary data of the image as text.
for example: http://127.0.0.1:8080/index.png
Just in case that it was a problem of mime types, I changed
every instance of "text/html" to "image/png" and it does
not shows the image anyway.
Which changes requires the script of mchttpd to load
in the browser all png or jpg as images instead of text?
Al
Take a look at this screenshot. It shows the same webpage
loaded from mchttpd and opened directly in the browser:
Test this by yourself. Download the stack from:
http://fourthworld.net/lc/mchttpd-4W.zip
Open the stack, click start server and load this webpage
in the browser: http://127.0.0.1:8080/index.html
Why loading this webpage using mchttpd does not show
all images?
Now load the same index.html directly from hard disk,
(not using mchttpd) and the internet browser show all
images correctly.
Notice that when I load an image directly, through mchttpd
the browser shows the binary data of the image as text.
for example: http://127.0.0.1:8080/index.png
Just in case that it was a problem of mime types, I changed
every instance of "text/html" to "image/png" and it does
not shows the image anyway.
Which changes requires the script of mchttpd to load
in the browser all png or jpg as images instead of text?
Al