[erlang-questions] Cowboy static file handler example

lloyd <>
Sun Apr 27 21:19:50 CEST 2014


Hi Loïc,

Browser is Firefox 28.0.

I'm just now updating Ubuntu from 12.10 to 13.10. 

Will re-visit this when update is finished.

Many thanks,

Lloyd

-----Original Message-----
From: "Loïc Hoguin" <>
Sent: Sunday, April 27, 2014 1:54pm
To: , "" <>
Subject: Re: [erlang-questions] Cowboy static file handler example

What's your browser, and did you try a different browser?

On 04/25/2014 07:53 PM,  wrote:
> 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:
>
> :~$ 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
>
>
> **********************************************
>
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions
>

-- 
Loïc Hoguin
http://ninenines.eu





More information about the erlang-questions mailing list