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
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
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
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)
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) )