[erlang-questions] Cowboy static file handler example
lloyd@REDACTED
lloyd@REDACTED
Fri Apr 25 19:53:38 CEST 2014
Hello,
The Cowboy static file handler example contains two demos: plain text file and HTML5 video. The plain text file demo works fine on my system; HTML5 video demo returns a blank screen.
In effort to understand why, I created a plain-vanilla HTML file with a single headline tag. This also returned a blank screen.
Evidently the server can't find the *.html file in the priv dir:
lloyd@REDACTED:~$ curl -i http://localhost:8080/test.html
HTTP/1.1 404 Not Found
connection: keep-alive
server: Cowboy
date: Fri, 25 Apr 2014 17:48:57 GMT
content-length: 0
content-type: text/html
-rw-rw-r-- 1 lloyd lloyd 383631 Apr 25 13:23 small.mp4
-rw-rw-r-- 1 lloyd lloyd 872453 Apr 25 13:24 small.ogv
-rw-rw-r-- 1 lloyd lloyd 84 Apr 25 13:48 test.html
-rw-rw-r-- 1 lloyd lloyd 52 Apr 25 12:52 test.txt
-rw-rw-r-- 1 lloyd lloyd 19753 Apr 25 13:17 tree.jpg
-rw-rw-r-- 1 lloyd lloyd 106622 Apr 25 13:16 tree.png
-rw-rw-r-- 1 lloyd lloyd 315 Apr 25 13:24 video.html
If I list the priv dir, test.html shows up, as does test.txt. But the server finds test.txt, but not test.html.
Am I doing something wrong? Or is there a problem with the Cowboy example code?
Thanks,
LRP
*********************************************
My books:
THE GOSPEL OF ASHES
http://thegospelofashes.com
Strength is not enough. Do they have the courage
and the cunning? Can they survive long enough to
save the lives of millions?
FREEIN' PANCHO
http://freeinpancho.com
A community of misfits help a troubled boy find his way
AYA TAKEO
http://ayatakeo.com
Star-crossed love, war and power in an alternative
universe
Available through Amazon or by request from your
favorite bookstore
**********************************************
More information about the erlang-questions
mailing list