Good idea, the explicit linking, it shows me I'm actually getting the
body, however somewhere later on I'm stalling. I keep forgetting that
traceAll doesn't in fact trace everything ;-)

My @pubsub function is not executing (and the hub reports failure),
which it is when I access it through the browser without the atom/xml
content type, so something with my approach is wrong.

The pertinent section in (http) now looks like this:

(when *Xml
                     (setq *Xml
                        (make
                           (while (line T) (link @))))
                     (close S)
                     (task S)
                     (off S)
                     (throw "http"))

I thought the solution might lie in cleaning up after reading
everything but it didn't help, oh well it's there now anyway.

Below is what I get when i both traceAll, link and line, maybe it will
get us closer to the solution:

 mime : "swf" "application/x-shockwave-flash" 3600
 mime =3D (("s" "w" "f") "application/x-shockwave-flash" 3600)
 redef : (ht:Pack (Lst) (ht:Pack (replace Lst "+" " ")))
 redef =3D "ht:Pack"
 server : 3000 "@start"
  task : 38 ((http @))
   link : 38
   link =3D 38
  task =3D (38 (http @))
  http : 38
   line :
   line =3D ("P" "O" "S" "T" " " "/" "@" "p" "u" "b" "s" "u" "b" " " "H"
"T" "T" "P" "/" "1" "." "1")
   _htHead :
    line :
    line =3D ("C" "o" "n" "t" "e" "n" "t" "-" "L" "e" "n" "g" "t" "h"
":" " " "4" "7" "0")
    line :
    line =3D ("A" "c" "c" "e" "p" "t" "-" "E" "n" "c" "o" "d" "i" "n"
"g" ":" " " "g" "z" "i" "p")
    line :
    line =3D ("X" "-" "H" "u" "b" "-" "S" "i" "g" "n" "a" "t" "u" "r"
"e" ":" " " "s" "h" "a" "1" "=3D" "2" "0" "9" "1" "c" "9" "4" "b" "2"
"1" "d" "5" "4" "a" "9" "f" "9" "2" "6" "5" "4" "5" "4" "2" "2" "1"
"f" "f" "5" "9" "a" "1" "5" "b" "0" "c" "4" "d" "8" "f")
    line :
    line =3D ("U" "s" "e" "r" "-" "A" "g" "e" "n" "t" ":" " " "A" "p"
"p" "E" "n" "g" "i" "n" "e" "-" "G" "o" "o" "g" "l" "e" ";" " " "("
"+" "h" "t" "t" "p" ":" "/" "/" "c" "o" "d" "e" "." "g" "o" "o" "g"
"l" "e" "." "c" "o" "m" "/" "a" "p" "p" "e" "n" "g" "i" "n" "e" ")")
    line :
    line =3D ("H" "o" "s" "t" ":" " " "l" "o" "c" "a" "l" "h" "o" "s"
"t" ":" "3" "0" "0" "0")
    line :
    line =3D ("R" "e" "f" "e" "r" "e" "r" ":" " " "h" "t" "t" "p" ":"
"/" "/" "l" "o" "c" "a" "l" "h" "o" "s" "t" "/")
    line :
    line =3D ("C" "o" "n" "t" "e" "n" "t" "-" "T" "y" "p" "e" ":" " "
"a" "p" "p" "l" "i" "c" "a" "t" "i" "o" "n" "/" "a" "t" "o" "m" "+"
"x" "m" "l")
    line :
    line =3D NIL
   _htHead =3D T
   line : T
   line =3D "<?xml version=3D\"1.0\" encoding=3D\"utf-8\"?>"
   link : "<?xml version=3D\"1.0\" encoding=3D\"utf-8\"?>"
   link =3D "<?xml version=3D\"1.0\" encoding=3D\"utf-8\"?>"
   line : T
   line =3D "<feed xmlns=3D\"http://www.w3.org/2005/Atom\";><title>henrik's
stream</title><id>http://localhost:8081//atom/stream/henrik</id><author><na=
me>henrik</name></author>"
   link : "<feed xmlns=3D\"http://www.w3.org/2005/Atom\";><title>henrik's
stream</title><id>http://localhost:8081//atom/stream/henrik</id><author><na=
me>henrik</name></author>"
   link =3D "<feed xmlns=3D\"http://www.w3.org/2005/Atom\";><title>henrik's
stream</title><id>http://localhost:8081//atom/stream/henrik</id><author><na=
me>henrik</name></author>"
   line : T
   line =3D NIL
   task : 38 NIL
   task =3D NIL
  http =3D NIL



On Wed, Dec 16, 2009 at 6:20 PM, Alexander Burger <a...@software-lab.de> wro=
te:
> Hi Henrik,
>
>> ((match '("P" "O" "S" "T" " " "/" @U " " "H" "T" "T" "P" "/" "1" "." @H)=
 L)
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (on *Post)
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (off *MPartLim *MPartEnd)
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (_htHead)
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (and *Xml
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(setq *Xml
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (make
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(while (link (ht:=
In T (line T))))))
>
> 'ht:In' must be called only once, right on the body following the
> header. So I would expect that
>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0...
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(_htHead)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(and *Xml
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (setq *Xml
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(ht:In T
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (make
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(while (line T=
)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (link @) =
) ) ) )
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ... )
>
> Note that I also changed
>
> =A0 =A0 =A0 =A0 (while (link (line T)))
>
> to
>
> =A0 =A0 =A0 =A0 (while (line T)
> =A0 =A0 =A0 =A0 =A0 =A0(link @) )
>
> because the former will link also the last NIL (on EOF) into the list
> returned by 'make', which might not be desired.
>
>
> The rest in '_htHead' looks all right.
>
>
>> Trying to run the above results in the hub reporting a failure to
>> deliver its payload, and traceAll gives me this when the hub tries to
>> deliver:
>>
>> =A0server : 3000 "@start"
>> =A0 task : 38 ((http @))
>> =A0 task =3D3D (38 (http @))
>> =A0 http : 38
>> =A0 =A0_htHead :
>> =A0 =A0_htHead =3D3D T
>> =A0 http =3D3D NIL
>>
>> It seems execution is not getting very far?
>
> This is because 'traceAll' traces only Lisp functions, and there are
> perhaps only built-in functions being called. You must explicitly
> 'trace' other functions you are interested in, e.g (trace 'line) and
> (trace 'link) or (mapc trace '(line link ..)).
>
> Cheers,
> - Alex
> --
> UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=3dunsubscribe
>
-- 
UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe

Reply via email to