On Sunday, December 7, 2003, at 10:12 am, Kjetil Kjernsmo wrote:


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?




The problem your seeing is a bug/feature of axkit as it currently works.


In order to setup a pipeline, axkit needs to know what sort of xml it's looking at,
so it sniffs the content [ first call to provider ], then having built the pipeline
it reads the content again [ second call ].


The problem is that the way providers/axkit currently work, it's not an easy problem
to fix without fundamentally changing the way a few things work. At the moment
providers are not cached, so if possible you could just stash the results away from
the first call to return in the second. Obviously this isn't a great long term solution,
since if ever anyone optimises axkit to cache providers then potentially lots of things
could break.


Things become really hard when your provider implements get_fh, and the fh your returning
is a socket.


I'm looking at ways to resolve this, but at the moment I've not got any great solutions.


Mike.










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



Reply via email to