How do, Is AxKit supposed to pass non-XML data straight through without raising errors?
I've got some files and, in some circumstances, requesting the files
should generate some XML. In other circumstances, the content of the
file should be sent through (or, at least, non-XML data should get sent
through).
..../foo.jpg <-- Generates some XML
..../foo.jpg?size=small <-- Generates image/jpeg data
You can probably guess where I'm going with this.
I've tried several approaches to this; a normal perl-handler, a module
implementing an Apache::Filter (with AxKit post-processing the output),
and an AxProvider.
I couldn't get the perl-handler to work. The Apache::Filter and the
AxProvider partially work. Generated XML is caught and styled by AxKit.
However, the images don't come through.
...
[AxKit] Caught an exception
[AxKit] [Error] xmlParse returned error: 4, Start tag expected, '<' not found
[AxKit] From: /usr/local/lib/perl5/site_perl/5.6.1/mach/Apache/AxKit/Exception.pm : 9
[AxKit] [Backtrace] xmlParse returned error: 4, Start tag expected, '<' not
found
Apache::AxKit::Exception::new('Apache::AxKit::Exception::Error',
'-text', 'xmlParse returned error: 4, Start tag expected, \'<\'
not found^J') called at
/usr/local/lib/perl5/site_perl/5.6.1/mach/AxKit.pm line 872
...
I'm pretty certain this is AxKit trying to parse the JPEG data (which,
IIRC, starts 'JPEG', and is probably the cause of the 'not found ^J'
text), instead of just letting it through.
The ::Filter and ::Provider approaches I've tried set the request's
content type appropriately as far as I can tell, but to no avail.
Thoughts? If this is something that we think should work then I'll put
together a small proof-of-concept that demonstrates the problem.
N
--
FreeBSD: The Power to Serve http://www.freebsd.org/ (__)
FreeBSD Documentation Project http://www.freebsd.org/docproj/ \\\'',)
\/ \ ^
--- 15B8 3FFC DDB4 34B0 AA5F 94B7 93A8 0764 2C37 E375 --- .\._/_)
msg02455/pgp00000.pgp
Description: PGP signature
