Re: Mini http server

2011-07-09 Thread Alexander Burger
Hi Henrik, (put '*Post key value) .. ((value . key) (value . key)) value I don't get it, isn't the put statement before ht:Out supposed to replace value under key? In principle, yes. However, the property functions use pointer equality, so if the key is a transient symbol, you must

Re: Mini http server

2011-07-09 Thread Alexander Burger
On Sat, Jul 09, 2011 at 07:36:39PM +0700, Henrik Sarvell wrote: I see, then we do like this instead: ... (when (cdr (setq L (split L =))) (push '*Post (list (ht:Pack (car L)) (ht:Pack ... And then we can fetch values like this: (de req

Re: Mini http server

2011-07-07 Thread Alexander Burger
Hi Henrik, How about this?: Good, this looks pretty minimal. (undef 'http) (de http (S) (use (*Post L @U @H @X) (off *Post *Port% *ContLen *Cookies *Cookies *HtSet) I think you can safely remove '*Port%', but that's not critical. It is only used in the form GUI to detect port

Re: Mini http server

2011-07-06 Thread Henrik Sarvell
How about this?: (undef 'http) (de http (S) (use (*Post L @U @H @X) (off *Post *Port% *ContLen *Cookies *Cookies *HtSet) (catch http (in S (cond ((not (setq L (line))) (task (close S)) (off S)

Re: Mini http server

2011-06-30 Thread Alexander Burger
Hi Henrik, The goal is also to have something that can be loaded after/instead of http.l when you want a simple web server without the fancy stuff. OK. (redef httpHead (Typ Upd File Att) (http1 Typ Upd File Att) (and *Chunked (prinl Transfer-Encoding: chunked^M)) (prinl ^M) )