Given the problems I'm having with the GUI framework I thought it
might be a good idea to skip it all together and try it the old
fashioned, simple way since we're just talking about two field form

So I changed the signin form to look like this:

(de signin ()
   (html 0 "Viz Reader" *Css NIL
      (let Usr (db 'uname '+User *Uname)
         (if (and Usr (= (; Usr pwd) *Pwd))
            (let Uid (; Usr uid)
               (cookie 'uid Uid)
               (setq *Cookies (cons 'uid Uid))
            (<post> NIL "@signin"
               (and (or *Uname *Pwd) (<div> NIL "Could not login."))
               (<table> NIL NIL NIL
                  (<row> NIL "Username" (<field> 10 '*Uname))
                  (<row> NIL "Password" (<passwd> 10 '*Pwd))
                  (<row> NIL "" (<submit> "Login"))
                  (<row> NIL (<href> "Sign Up" "@register"))))))))

It is however giving me this when I submit it:

<html xmlns=""; xml:lang="en" lang="en">
<title>Viz Reader</title>
<base href="http://localhost:8080/"/>
<link rel="stylesheet" type="text/css"
<script type="text/javascript" src="http://localhost:8080/lib/form.js";></script>
<body>HTTP/1.0 303 See Other
Server: PicoLisp
Location: http://localhost:8080/@desktop
Content-Type: text/html
Set-Cookie: $uid=+499978151698647371592345114; path=/
Content-Length: 89

<HEAD><TITLE>303 See Other</TITLE></HEAD>
<BODY><H1>See Other</H1></BODY>


A strange result where the headers and some unwanted HTML are showing
up in the body. Is (redirect) somehow relying on the GUI framework?


Reply via email to