Very nice! I cant wait to give it a try!

On Thu, Nov 25, 2010 at 8:52 PM, Romain Beauxis <[email protected]>wrote:

> 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}<http://localhost:8080#%7Bs%7D>
> ")
> 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
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/savonet-users
>



-- 
=========================================
Brandon Casci
Loudcaster
http://loudcaster.com
=========================================
------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to