commit e8c8d0395df60365663db374c4bab02ae6ec9541
parent 5c4e1e437d241ac613d35868799eba712b43bb5b
Author: Commit-Bot <unknown>
Date: Sun, 27 Jun 2010 09:03:45 +0000
Automatic commit from picoLisp.tgz, From: Sun, 27 Jun 2010 09:03:45 GMT
Diffstat:
2 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/lib/form.l b/lib/form.l
@@ -1,4 +1,4 @@
-# 25jun10abu
+# 27jun10abu
# (c) Software Lab. Alexander Burger
# *PRG *Top *Gui *Btn *Get *Got *Form *Evt *Lock *Spans
@@ -118,7 +118,7 @@
(*Post
(unless (and *PRG (= *Form (car *Got)) (= *Get (cadr *Got)))
(pushForm (cons)) )
- (if *Get1
+ (if *Port%
(let *JS NIL (_doForm))
(_doForm) )
(off *PRG *Got) )
diff --git a/lib/http.l b/lib/http.l
@@ -1,9 +1,9 @@
-# 25jun10abu
+# 27jun10abu
# (c) Software Lab. Alexander Burger
-# *Home *Gate *Host *Port *Port1 *Http1 *Chunked
+# *Home *Gate *Host *Port *Port1 *Port% *Http1 *Chunked
# *Sock *Agent *ContLen *MPartLim *MPartEnd "*HtSet"
-# *Get1 *Post *Url *Timeout *SesId *ConId
+# *Post *Url *Timeout *SesId *ConId
# *Referer *Cookies "*Cookies"
(default
@@ -90,7 +90,7 @@
(NIL (fork) (close P))
(close *Sock) )
(task *Sock (http @))
- (http *Sock T)
+ (http *Sock)
(or *SesId (bye))
(task *Sock
(when (accept *Sock)
@@ -119,8 +119,10 @@
# Application startup
(de app ()
- (unless *SesId
+ (if *SesId
+ (off *Port%)
(setq
+ *Port% (unless *Gate (= *Port *Port1))
*SesId (pack (in "/dev/urandom" (rd 7)) "~")
*Sock (port *HPorts '*Port) )
(timeout *Timeout) ) )
@@ -132,7 +134,7 @@
(push '"*Cookies" (cons (arg) (rest))) ) )
# Handle HTTP-Transaction
-(de http (S *Get1)
+(de http (S)
(use (*Post L @U @H @X)
(off *Post *ContLen *Cookies "*Cookies" "*HtSet")
(catch "http"