From: justinhj
Subject: mod_lisp2 read-line oddity
Date: 
Message-ID: <1156255014.994908.220190@p79g2000cwp.googlegroups.com>
Anyone who has succesfully got mod_lisp2 working I need your help with
a puzzling problem...

My setup is Apache/2.0.55 (Debian), CMU Common Lisp CVS 19c
19c-release-patch-1 + minimal debian patches (19C)

The mod_lisp2 module is definitely loaded and sending data to my cmucl
lisp process.

I've been adding printf style debugging to trace each step and where
it seems to be going wrong is when you do a read-line on what the
apache server is sending you get this output...

(this is the assoc list generated)

apache_listening...
get-apache-command...
key-value pair (server-protocolserver-protocol . )
key-value pair (HTTP/1.1HTTP/1.1 . )
key-value pair (methodmethod . )
key-value pair (GETGET . )
key-value pair (urlurl . )
key-value pair (/orangeodor/orangeodor . )
key-value pair (server-ip-addrserver-ip-addr . )
key-value pair (192.168.0.11192.168.0.11 . )

So what I'm seeing is when I do readline I get two copies of the key,
and when I do read-line again for the value I get nil.

Very odd

I'm thinking it may be some kind of text format issue (with newlines
not being handled correctly at one end of the pipe?) but I'm new to
apache and mod_lisp2 so I'm running out of ideas.

TIA

Justin

From: Lars Rune Nøstdal
Subject: Re: mod_lisp2 read-line oddity
Date: 
Message-ID: <pan.2006.08.22.15.14.20.996716@gmail.com>
On Tue, 22 Aug 2006 06:56:55 -0700, justinhj wrote:
> (this is the assoc list generated)
> 
> apache_listening...
> get-apache-command...
> key-value pair (server-protocolserver-protocol . )
> key-value pair (HTTP/1.1HTTP/1.1 . )
> key-value pair (methodmethod . )
> key-value pair (GETGET . )
> key-value pair (urlurl . )
> key-value pair (/orangeodor/orangeodor . )
> key-value pair (server-ip-addrserver-ip-addr . )
> key-value pair (192.168.0.11192.168.0.11 . )
> 
> So what I'm seeing is when I do readline I get two copies of the key,
> and when I do read-line again for the value I get nil.

Are you using the latest version of mod_lisp? There was a bug in it a
while ago that looked like this, I think.

You can get the latest here:
http://www.fractalconcept.com:8000/public/open-source/mod_lisp/mod_lisp2.c

-- 
Lars Rune Nøstdal
http://lars.nostdal.org/
From: justinhj
Subject: Re: mod_lisp2 read-line oddity
Date: 
Message-ID: <1156275403.993828.101680@b28g2000cwb.googlegroups.com>
Lars Rune Nøstdal wrote:
> You can get the latest here:
> http://www.fractalconcept.com:8000/public/open-source/mod_lisp/mod_lisp2.c
>
> --
> Lars Rune Nøstdal
> http://lars.nostdal.org/

Yes I had the old version, thanks Lars. Don't know how my extensive
googling missed that one, but it was 2am when I got stuck.

Justin
From: Alan Grover
Subject: Re: mod_lisp2 read-line oddity
Date: 
Message-ID: <12eolc9p8qtc048@corp.supernews.com>
justinhj wrote:

> Anyone who has succesfully got mod_lisp2 working I need your help with
> a puzzling problem...
> 
> My setup is Apache/2.0.55 (Debian), CMU Common Lisp CVS 19c
> 19c-release-patch-1 + minimal debian patches (19C)

Which version of mod_lisp2? The web-home of mod_lisp
(http://www.fractalconcept.com/asp/PDk2/sdataQ1nS$wEk$GxXDM==/sdataQuMh-N3qe0jUC1B=)
has bad links. This,
http://www.fractalconcept.com/fcweb/download/mod_lisp-current.tgz, was
correct recently. In mod_lisp2.c, look for the "change log", the top entry
is dated 2006-03-14.
 
> The mod_lisp2 module is definitely loaded and sending data to my cmucl
> lisp process.
> 
> I've been adding printf style debugging to trace each step and where
> it seems to be going wrong is when you do a read-line on what the
> apache server is sending you get this output...
> 
> (this is the assoc list generated)
> 
> apache_listening...
> get-apache-command...
> key-value pair (server-protocolserver-protocol . )
> key-value pair (HTTP/1.1HTTP/1.1 . )
> key-value pair (methodmethod . )
> key-value pair (GETGET . )
> key-value pair (urlurl . )
> key-value pair (/orangeodor/orangeodor . )
> key-value pair (server-ip-addrserver-ip-addr . )
> key-value pair (192.168.0.11192.168.0.11 . )
> 
> So what I'm seeing is when I do readline I get two copies of the key,
> and when I do read-line again for the value I get nil.

Well, actually, you are demonstrating that your
        (to-pair (readline xxx ))
is generating a double-key. What is the actually result of readline?
 
> Very odd

On the other-hand, the most recent change-log entry in mod_lisp2.c sez:
"Fixed u bug that made mod_lisp send all twice to the lisp process."
Which sounds suspicious.

I've been reliably using mod_lisp2 for quite a while. And, it seems that the
correct version does work correctly.

> I'm thinking it may be some kind of text format issue (with newlines
> not being handled correctly at one end of the pipe?) but I'm new to
> apache and mod_lisp2 so I'm running out of ideas.
> 
> TIA
> 
> Justin
From: justinhj
Subject: Re: mod_lisp2 read-line oddity
Date: 
Message-ID: <1156342764.143938.113980@m79g2000cwm.googlegroups.com>
Alan Grover wrote:
> justinhj wrote:
> I've been reliably using mod_lisp2 for quite a while. And, it seems that the
> correct version does work correctly.
>
> > I'm thinking it may be some kind of text format issue (with newlines
> > not being handled correctly at one end of the pipe?) but I'm new to
> > apache and mod_lisp2 so I'm running out of ideas.

Yeah I thought I had the latest version but didn't, and somehow my
searches did not hit upon that fix comment. It's all working now.

Justin