Re: mod_layout and dynamic images
Brian Aker <[email protected]> Sun, 29 Apr 2007 23:34:37 -0700
| Newsgroups | gmane.comp.apache.mod-layout |
|---|---|
| Message-ID | <[email protected]> |
Hi!
I've not tried this, but something like this should do the trick (and
would have in the previous versions):
pare-Laptop:~/tangent/mod_layout-4.0 brian$ hg diff
diff -r 25db8561511d mod_layout.c
--- a/mod_layout.c Wed Feb 21 15:00:37 2007 -0800
+++ b/mod_layout.c Sun Apr 29 23:33:38 2007 -0700
@@ -264,6 +264,11 @@ static apr_status_t layout_filter(ap_fil
if (cfg->uris_ignore)
{
if (table_find(cfg->uris_ignore, r->uri))
+ return ap_pass_brigade(f->next, b);
+ }
+ if (cfg->types)
+ {
+ if (!(table_find(cfg->types, r->content_type)))
return ap_pass_brigade(f->next, b);
}
Cheers,
-Brian
On Apr 29, 2007, at 1:19 PM, Aaz wrote:
> Hello,
>
> I'd like to continue discussion about problem described
> here
> http://lists.tangent.org/pipermail/mod_layout/2007-February/
> 002237.html
> and here
> http://lists.tangent.org/pipermail/mod_layout/2004-March/002069.html
>
> The problem is about dynamically changed Content-type header of the
> output document.
> For example:
> <?php
> header("Content-Type: image/png");
> $string = $_GET['text'];
> $im = imagecreate(300,300);
> $orange = imagecolorallocate($im, 220, 210, 60);
> $px = (imagesx($im) - 7.5 * strlen($string)) / 2;
> imagestring($im, 3, $px, 9, $string, $orange);
> imagepng($im);
> imagedestroy($im);
> ?>
>
>
> This script shouldnt be processed by mod_layout, but it is.
> I have output_buffering=On in php.ini file, but it doesnt help.
> I cant use LayoutIgnoreURI
>
> I'm using latest apache 2.2 and mod_layout 5.0.
> Is there a way to avoid processing such scripts?
> Maybe there's some workaround about this problem?
> _______________________________________________
> Mod_layout mailing list
> [email protected]
> http://lists.tangent.org/mailman/listinfo/mod_layout