Re: Pico, handling requests from jQuery

2008-05-27 Thread Jon Kleiser
Hi Alex, Hi Jon, Could it be me doing something wrong in Pico Lisp? Here are the first few lines on my request handler: (de getDirectory () (let Path (get 'path 'http) (out NIL (println "getDirectory request" Path)) (httpHead "text/javascript; charse

Re: Pico, handling requests from jQuery

2008-05-27 Thread Alexander Burger
Hi Jon, > Could it be me doing something wrong in Pico Lisp? Here are the first > few lines on my request handler: > > (de getDirectory () > (let Path (get 'path 'http) > (out NIL (println "getDirectory request" Path)) > (httpHead "text/javascript; charset=utf-8

Re: Pico, handling requests from jQuery

2008-05-27 Thread Alexander Burger
Hi John, > The + shows up in post data too, when the default "application/x-www- > form-urlencoded" content type is used and there are spaces in a value. Thanks. I was not aware of that (or forgot about it), perhaps because the picoLisp server exclusively uses content type "multipart/form-data".

Re: Pico, handling requests from jQuery

2008-05-27 Thread John Duncan
The + shows up in post data too, when the default "application/x-www- form-urlencoded" content type is used and there are spaces in a value. On 27 May 2008, at 5:16 AM, Alexander Burger wrote: > Hi Jon, > >> properly. I get the "+" in Pico Lisp. Therefor I cannot know whether >> a "+" in Pico Li

Re: Pico, handling requests from jQuery

2008-05-27 Thread Jon Kleiser
Hi Alex, > properly. I get the "+" in Pico Lisp. Therefor I cannot know whether a "+" in Pico Lisp originated as a "+" or a space. I think the plus-to-space decoding has to be done at the same time as the %xy decoding. Or ... OK, I understand. As the %xy decoding happens in 'ht:Pack', yo

Re: Pico, handling requests from jQuery

2008-05-27 Thread Alexander Burger
Hi Jon, > properly. I get the "+" in Pico Lisp. Therefor I cannot know whether > a "+" in Pico Lisp originated as a "+" or a space. I think the > plus-to-space decoding has to be done at the same time as the %xy > decoding. Or ... OK, I understand. As the %xy decoding happens in 'ht:Pack', yo

Re: Pico, handling requests from jQuery

2008-05-27 Thread Jon Kleiser
Hi Alex, > space, like "A B", it will turn up in Pico Lisp like "A+B". Is there As a built-in function there is only 'ht:Pack', which is used e.g. in "lib/http.l". But it just decodes hex patterns like "%20": : (ht:Pack (chop "A%20B%20C")) -> "A B C" If you are only concerned about '

Re: Pico, handling requests from jQuery

2008-05-27 Thread Alexander Burger
Hi Jon, > space, like "A B", it will turn up in Pico Lisp like "A+B". Is there As a built-in function there is only 'ht:Pack', which is used e.g. in "lib/http.l". But it just decodes hex patterns like "%20": : (ht:Pack (chop "A%20B%20C")) -> "A B C" If you are only concerned about '+',

Re: Pico, handling requests from jQuery

2008-05-27 Thread Jon Kleiser
Hi Alex, At 09:00 +0200 19-05-08, Jon Kleiser wrote: If I set up the input data for the getJSON call like this: data = {Y: "Y-value", Z: 333}; data["*X"] = 111; ... then I can handle the request in Pico Lisp like this: (de json () (httpHead "text/plain; charset=utf-8") (ht:Out T (