Le jeudi 25 novembre 2010 18:05:51, Romain Beauxis a écrit : > Basically, what you have to do is write a script that fetches status.xml > and returns its content. Then you can do for instance: > > def status(uri,headers) = > # inline headers > headers = list.map(fun (x,y) -> "#{x}: #{y}", l) > headers = string.concat(seperator="\r\n", headers) > # Get script output > get_process_output("/path/to/script #{quote(uri)} \"#{quote(headers)}\"") > end > > # Hook up > harbor.http.register(port=8005, "status.xml", status) > > (sorry code untested :) )
The following is tested :) Using wget is a cheap solution but that works for a simple example! # Serve all files other # than /admin.* from icecast def get_icecast(s,headers) = def f(x) = "--headers '#{fst(x)}: #{snd(x)}'" end headers = list.map(f,headers) headers = string.concat(separator=" ",headers) headers = "" get_process_output("wget -q -O - #{headers} http://localhost:8080#{s}") end harbor.http.register(port=8000,"^/(?!admin)",get_icecast) ------------------------------------------------------------------------------ Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! Tap into the largest installed PC base & get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev _______________________________________________ Savonet-users mailing list Savonet-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/savonet-users