Re: Static files and hook_xml_response
On Wednesday, 24. January 2007 13:24, [EMAIL PROTECTED] wrote: I'm still having static files, .js, .jpg etc go through hook_xml_response. I have a test in there that returns DECLINED for such files, but it's a bit of a kludge. Perhaps it should be possible to do it via the config file? I was told it did this some time back but the latest svn (back then) didn't seem to do it. No doubt more PEBKAC than Ax2 though :) Files *.yourDynamicPagesExtension Plugin yourApplicationPlugin /Files or similar. That way, your plugin is only called for the fhiles it actually processes. Check the docs, I implemented Files and Location sections, they should work mostly like Apache. One important difference is that plugins are always called in config file document order (in case multiple plugins implement a handler). -- CU Joerg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Static files and hook_xml_response
On 24 Jan 2007 at 15:49, Also Sprach Jörg Walter: On Wednesday, 24. January 2007 13:24, [EMAIL PROTECTED] wrote: I'm still having static files, .js, .jpg etc go through hook_xml_response. I have a test in there that returns DECLINED for such files, but it's a bit of a kludge. Perhaps it should be possible to do it via the config file? Files *.yourDynamicPagesExtension Plugin yourApplicationPlugin /Files or similar. That way, your plugin is only called for the fhiles it actually processes. Ah, that may be my problem, I don't have dynamic page extensions. Below is my config file. Is what I want not possible with this setup? PluginDir /usr/lib/perl5/site_perl/5.8.7/i486-linux/AxKit2/plugins Pluginlogging/warn LogLevel LOGDEBUG Plugin request_log RequestLog access_log Plugin error_xml ErrorStylesheet /home/john/perl/ecomm/error.xsl StackTrace On Plugin fast_mime_map Plugin parse_post_data DocumentRoot /home/john/perl/ecomm/webroot Server Port 8010 Plugin uri_to_file Plugin serve_file DirectoryIndex index.xml Location /ecomm Plugin development Plugin cachecache CacheModule Memory # ten megabytes (ish) CacheSize1000 CacheNamespace ecomm CacheExpiresIn 10hours DocumentRoot/home/john/perl/ecomm/web/webroot PluginDir /home/john/perl/ecomm/web/plugins Plugin ecomm.pm ShowParams 1 StyleSheetDir /home/john/perl/ecomm/web/stylesheets /Location /Server - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Static files and hook_xml_response
On Wednesday, 24. January 2007 16:40, [EMAIL PROTECTED] wrote: Ah, that may be my problem, I don't have dynamic page extensions. Below is my config file. Is what I want not possible with this setup? Yes it is. While things may look Apache-ish, we are talking about a perl program. Of course Location and Files also support regexes. So you can match your dynamic pages any possible way. Another approach would be a second Location block, as only one the first match per nesting level is used. Location ^/ecomm/.*\.(js|png)$ Path /ecomm ... /Location Location /ecomm ... /Location I hope you get the idea. Compare the docs regarding these directives, they should be more accurate than my back-of-the-mind recapture. -- CU Joerg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]