On 01/11/2010, at 8:42 PM, RF wrote: > > > On 30 Ott, 18:15, john skaller <skal...@users.sourceforge.net> wrote: >> The felix webserver is now up and running: >> >> http://184.106.135.43:1234/ > > This is cool. > > How do I go about generalising it to write other types of webservers? > i.e. to serve other stuff.
It's a felix program in tools directory. To make it's behaviour change you have to edit the code :) > Can I get at request headers fields? Can I set response header fields? You'll have to read the code. What we DO need is an enhancement to demux/faio so that the webserver can do partial/timed/async reads. Basically, one doesn't know how much to read to get the http GET request, since it is a "line". At present the server reads one character at a time from faio, which is a bit slow. Also, it will block forever if the client sends a partial header and then just sits around: that's a DNS attack. >> The webserver is built like >> >> flx --static -c tools/webserver >> gcc -o tools/mk_daemon tools/mk_daemon.c >> tools/mk_daemon tools/webserver --root=/usr/local/lib/felix/felix-1.1.5 > > Can I use nohup instead of this daemon? I have no idea. If you run a variant on slicehost, make sure you set --port=9999 to something *other* than 1234 or you'll be competing with the server there that's running eg tools/webserver --root=/usr/local/lib/felix/felix-1.1.5 --port=2222 The latest version (now running) colours and hyperlinks C in header and body statements inside Felix code. My next trick will be to hyperlink Felix's requires package "fred"; so you can examine config/fred.fpc And I'll sort the directories (this is done by the system on MacOSX but not Linux), and partition into subdirectories and ordinary files. -- john skaller skal...@users.sourceforge.net ------------------------------------------------------------------------------ Nokia and AT&T present the 2010 Calling All Innovators-North America contest Create new apps & games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev _______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language