Hi Alex,

On Thu, Mar 17, 2011 at 12:46 AM, Alexander Burger <a...@software-lab.de> wrote:
> Hi Edwin,
>
>> i got as far as figuring out where a script is executed in a
>> (listen)-ing http server.
>>
>> i think it's somewhere here in http.l:
>>
>>                      ((= '@ (car @U))
>>                         #URL starts with @
>>                         #@U is @start by default
>>                         (if (disallowed)
>>                            (prog (msg *Url " not allowed") (http404))
>>
>>                            (and *SesId (timeout *Timeout))
>>  # put this here to find out what the (apply (val... kungfu below is doing
>>                            (out NIL (println ((val (intern (ht:Pack
>> (cdr @U)))) L)))
>>                            (apply (val (intern (ht:Pack (cdr @U)))) L) ) )
>
> Actually, this is not the place where a script is executed, but a direct
> Lisp function call. For that, the funtion's name is written in the URL
> as "@foo".

ah. yes. my mistake.

>
> A lisp script (source file) is executed a little more down in the
> source, at
>
>                     ((tail '("." "l") @U)
>                        (and *SesId (timeout *Timeout))
>                        (apply script L *Url) )
>
> i.e. when the name ends with ".l".
>
>
>
>> all well and good. now how do i set a cookie?
>
> You can create cookies by calling the 'cookie' function in your function
> or script:
>
>   (cookie "Name" "This is" "my name")
>
> or
>
>   (cookie "Address" "My City" "My Street")
>
> The first argument is the cookie's name, and all following arguments are
> stored as a list as the cookie's value.
>
> They will be transmitted in the HTTP response.
>
>
> Upon the next request, all cookies will be returned in an assoc list in
> the global variable '*Cookies'.
>

it works! thank you.

/e
--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to