So my goal is to serve streaming video, but only after authentication. Since authentication could use one of many methods, I'm writing a fastcgi authorizer to handle them. Each part (streaming, fastcgi authorizer) works independently, but together things fall apart.
I have a demo set up here. I have three sections: each with an image and a video. The first section is showing public content, the second is showing private content (must authenticate first), and the third is using a JS wrapper to manage the showing of private content. To get authorization, click "Get Access". then return to the index page.
What happens is the private video never loads (though the private image loads fine). Also there is no error or access log line indicating that the private video is being loaded or even requested.
The relevant part of my lighttpd config
server.modules += ("mod_h264_streaming")
server.modules += ("mod_fastcgi")
h264-streaming.extensions = ( ".mp4", ".f4v" )
h264-streaming.buffer-seconds = 10
fastcgi.debug = 1
fastcgi.server = (
"/fake_cookie" => ( "fake_cookie" => (
"socket" => "/Users/geoff/manual/lighttpd/build/lighttpd.fake_cookie.fcgi.sock",
"bin-path" => "/Users/geoff/manual/lighttpd/build/fcgi/fake_cookie.pl",
"check-local" => "disable"
)),
"/kill_cookie" => ( "kill_cookie" => (
"socket" => "/Users/geoff/manual/lighttpd/build/lighttpd.kill_cookie.fcgi.sock",
"bin-path" => "/Users/geoff/manual/lighttpd/build/fcgi/kill_cookie.pl",
"check-local" => "disable"
)),
"/authenticate" => ( "authenticate" => (
"socket" => "/Users/geoff/manual/lighttpd/build/lighttpd.authenticate.fcgi.sock",
"bin-path" => "/Users/geoff/manual/lighttpd/build/fcgi/authenticate.pl",
"check-local" => "disable"
)),
"/authorized/" => ( "gatekeeper" => (
"socket" => "/Users/geoff/manual/lighttpd/build/lighttpd.gatekeeper.fcgi.sock",
"mode" => "authorizer",
"bin-path" => "/Users/geoff/manual/lighttpd/build/fcgi/gatekeeper.pl",
"docroot" => "/Users/geoff/manual/lighttpd/build/host_authorized/",
"check-local" => "disable"
))
)
Note that gatekeeper.pl is the fastcgi authorizer.