Hi all!

I'm working with my new system, and I'll upload some code to CPAN soon 
(pre-alpha stuff, but then "release early!"). 

But I've noticed a strange problem: My provider seems to be called twice, to 
deal with the same resource. And it seems to work fine the first time, but my 
code isn't robust enough to deal with the second turn around, but then, I 
thought I'd try to understand why it is run twice rather than fix the code... 

It's just a content provider now. During development, I prefer it to send XML 
to the browser, so I have not implemented any get_styles. Could this be 
relevant? 

Log excerpt, with my comments between asterix:

[Sun Dec  7 10:52:13 2003] [warn] [client 127.0.0.1] [AxKit] handler called 
for /news/tester/test1/comment/rev/thread
[Sun Dec  7 10:52:13 2003] [warn] [client 127.0.0.1] [AxKit] Content Provider 
Override: AxKit::App::TABOO::Provider::News
[Sun Dec  7 10:52:13 2003] [warn] [client 127.0.0.1] [AxKit] Request object: 
GET http://localhost/news/tester/test1/comment/rev/thread

HTTP/0.9 (null)

* I just connected to port 80, same result with a real browser *

[Sun Dec  7 10:52:13 2003] [warn] [client 127.0.0.1] [AxKit] [uri] News 
Provider using URI /news/tester/test1/comment/rev/thread
[Sun Dec  7 10:52:13 2003] [warn] [client 127.0.0.1] [AxKit] [News] Initial 
Story Fetched: $VAR1 = bless( {
                 'LINKTEXT' => undef,
 * SNIP, some data I'm logging for debugging *




[Sun Dec  7 10:52:14 2003] [warn] [client 127.0.0.1] [AxKit] checking if we 
process this resource
[Sun Dec  7 10:52:14 2003] [warn] [client 127.0.0.1] [AxKit] media: screen, 
preferred style: #default
[Sun Dec  7 10:52:14 2003] [warn] [client 127.0.0.1] [AxKit] Cache: key = 
4a30a09110455bb27543252c30db9bb4
[Sun Dec  7 10:52:14 2003] [warn] [client 127.0.0.1] [AxKit] getting styles 
and external entities from the XML
[Sun Dec  7 10:52:14 2003] [warn] [client 127.0.0.1] [AxKit] styles not cached 
- calling $provider->get_styles()
[Sun Dec  7 10:52:14 2003] [warn] [client 127.0.0.1] [AxKit] get_styles: 
creating XML::Parser
[Sun Dec  7 10:52:14 2003] [warn] [client 127.0.0.1] [AxKit] [News] We shall 
show a thread, not the story

* This is fine, it does exactly what it is supposed to *

[Sun Dec  7 10:52:14 2003] [warn] [client 127.0.0.1] [AxKit] $VAR1 = '
<taboo>
* SNIP, lots of well-formed XML, the stuff it is supposed to output to the 
browser * 
</taboo>
';

[Sun Dec  7 10:52:14 2003] [warn] [client 127.0.0.1] [AxKit] get_styles: 
calling XML::Parser->parse('/news/tester/test1/comment/rev/thread')
[Sun Dec  7 10:52:14 2003] [warn] [client 127.0.0.1] [AxKit] get_styles: parse 
returned successfully
[Sun Dec  7 10:52:14 2003] [warn] [client 127.0.0.1] [AxKit] Calling 
GetMatchingProcessors with (screen, , , , taboo)
[Sun Dec  7 10:52:14 2003] [warn] [client 127.0.0.1] [AxKit] Caught an 
exception
[Sun Dec  7 10:52:14 2003] [warn] [client 127.0.0.1] [AxKit] [DECLINED] From: 
/usr/local/share/perl/5.6.1/Error.pm : 148

* So, it caught an exception *

[Sun Dec  7 10:52:14 2003] [warn] [client 127.0.0.1] [AxKit] [News] We shall 
show a thread, not the story

* Here we go again. It is running the whole thing over again *

[Sun Dec  7 10:52:14 2003] [error] [client 127.0.0.1] File does not exist: 
/var/www/news/tester/test1/comment/rev/thread

* And as I said, my code is not robust enough to deal with that, so it fails 
miserably *

Except for some things I can't imagine can have in impact my config looks like 
this:

SetHandler perl-script
PerlModule AxKit
AddType text/xml .xsp
Options -All +Indexes +FollowSymLinks
DirectoryIndex index.xsp    
AddHandler axkit .xml .xsp
AxDebugLevel 10
AxAddStyleMap application/x-xsp Apache::AxKit::Language::XSP
AxAddStyleMap text/xsl Apache::AxKit::Language::LibXSLT

<Location /news/>
        PerlHandler AxKit
        AxContentProvider AxKit::App::TABOO::Provider::News
</Location>


Anybody seen things like this before?

Any hints?

Best,

Kjetil


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to