I should really be more patient with myself before posting, I promise
this will be the last one for today, anyway I tried the following:

(when *Xml
                     (setq *Xml
                        (make
                           (until (eof) (line T) (link @)))))

And I now get this at the end instead, the full body finally but the
script still stalls, my @pubsub function still isn't getting executed
and the hub still reports failure:

    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 : T
   link =3D T
   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 : T
   link =3D T
   line : T
   line =3D NIL
   link : T
   link =3D T
   line : T
   line =3D "<entry><title>jpoihouh</title><id>http://localhost:8081/notice=
/cefae94a-5ace-494d-beaf-212722f9f8b1</id><link
href=3D\"http://localhost:8081/notice/cefae94a-5ace-494d-beaf-212722f9f8b1\=
"/><summary>oihoihoih</summary><updated>2009-12-16T22:01:42+01:0</updated><=
/entry>"
   link : T
   link =3D T
   line : T
   line =3D "</feed>"
   link : T
   link =3D T
  http =3D NIL


On Wed, Dec 16, 2009 at 9:47 PM, Henrik Sarvell <hsarv...@gmail.com> wrote:
> I think I was a bit quick in stating earlier that I got the whole
> body, the PHP dump again:
>
> <?xml version=3D"1.0" encoding=3D"utf-8"?>
> <feed xmlns=3D"http://www.w3.org/2005/Atom";><title>henrik's
> stream</title><id>http://localhost:8081//atom/stream/henrik</id><author><=
name>henrik</name></author>
>
> <entry><title>8h98h98</title><id>http://localhost:8081/notice/13caea6a-50=
16-4504-8b55-d995d37d78bc</id><link
> href=3D"http://localhost:8081/notice/13caea6a-5016-4504-8b55-d995d37d78bc=
"/><summary>89gh97gh9</summary><updated>2009-12-14T22:25:02+01:0</updated><=
/entry>
> </feed>
>
> Note the gap there, between the author tag and the beginning of the
> entry tag, looks like an empty line to me, could that have anything to
> do with it?
>
>
>
> On Wed, Dec 16, 2009 at 9:12 PM, Henrik Sarvell <hsarv...@gmail.com> wrot=
e:
>> 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
>> =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 (while (line T) (lin=
k @))))
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (close S)
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (task S)
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (off S)
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (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:
>>
>> =A0mime : "swf" "application/x-shockwave-flash" 3600
>> =A0mime =3D (("s" "w" "f") "application/x-shockwave-flash" 3600)
>> =A0redef : (ht:Pack (Lst) (ht:Pack (replace Lst "+" " ")))
>> =A0redef =3D "ht:Pack"
>> =A0server : 3000 "@start"
>> =A0task : 38 ((http @))
>> =A0 link : 38
>> =A0 link =3D 38
>> =A0task =3D (38 (http @))
>> =A0http : 38
>> =A0 line :
>> =A0 line =3D ("P" "O" "S" "T" " " "/" "@" "p" "u" "b" "s" "u" "b" " " "H=
"
>> "T" "T" "P" "/" "1" "." "1")
>> =A0 _htHead :
>> =A0 =A0line :
>> =A0 =A0line =3D ("C" "o" "n" "t" "e" "n" "t" "-" "L" "e" "n" "g" "t" "h"
>> ":" " " "4" "7" "0")
>> =A0 =A0line :
>> =A0 =A0line =3D ("A" "c" "c" "e" "p" "t" "-" "E" "n" "c" "o" "d" "i" "n"
>> "g" ":" " " "g" "z" "i" "p")
>> =A0 =A0line :
>> =A0 =A0line =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")
>> =A0 =A0line :
>> =A0 =A0line =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" ")")
>> =A0 =A0line :
>> =A0 =A0line =3D ("H" "o" "s" "t" ":" " " "l" "o" "c" "a" "l" "h" "o" "s"
>> "t" ":" "3" "0" "0" "0")
>> =A0 =A0line :
>> =A0 =A0line =3D ("R" "e" "f" "e" "r" "e" "r" ":" " " "h" "t" "t" "p" ":"
>> "/" "/" "l" "o" "c" "a" "l" "h" "o" "s" "t" "/")
>> =A0 =A0line :
>> =A0 =A0line =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")
>> =A0 =A0line :
>> =A0 =A0line =3D NIL
>> =A0 _htHead =3D T
>> =A0 line : T
>> =A0 line =3D "<?xml version=3D\"1.0\" encoding=3D\"utf-8\"?>"
>> =A0 link : "<?xml version=3D\"1.0\" encoding=3D\"utf-8\"?>"
>> =A0 link =3D "<?xml version=3D\"1.0\" encoding=3D\"utf-8\"?>"
>> =A0 line : T
>> =A0 line =3D "<feed xmlns=3D\"http://www.w3.org/2005/Atom\";><title>henri=
k's
>> stream</title><id>http://localhost:8081//atom/stream/henrik</id><author>=
<name>henrik</name></author>"
>> =A0 link : "<feed xmlns=3D\"http://www.w3.org/2005/Atom\";><title>henrik'=
s
>> stream</title><id>http://localhost:8081//atom/stream/henrik</id><author>=
<name>henrik</name></author>"
>> =A0 link =3D "<feed xmlns=3D\"http://www.w3.org/2005/Atom\";><title>henri=
k's
>> stream</title><id>http://localhost:8081//atom/stream/henrik</id><author>=
<name>henrik</name></author>"
>> =A0 line : T
>> =A0 line =3D NIL
>> =A0 task : 38 NIL
>> =A0 task =3D NIL
>> =A0http =3D NIL
>>
>>
>>
>> On Wed, Dec 16, 2009 at 6:20 PM, Alexander Burger <a...@software-lab.de> =
wrote:
>>> 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 (h=
t: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