Re: mod_layout change HTTP header

Brian Aker <[email protected]> Fri, 23 Feb 2007 14:19:51 -0800
Newsgroups gmane.comp.apache.mod-layout
Message-ID <[email protected]>
Hi!

mod_layout for Apache 1.3 grabs the document after the generator is  
done with it. To do this it turns off the headers for the original  
document and then generates its own headers. What are you wanting to do?

 From looking at your description it looks like a second check for  
content-type should be made to avoid scrambling output like yours  
(though you can do this through ignore uri bits as well).

Cheers,
	-Brian

On Feb 23, 2007, at 11:26 AM, - = k o l i s k o = - wrote:

> Hi all,
>
> i have installed mod_layout on Debian Sarge server (versions bellow)
>
>
> cut /etc/apache/httpd.conf
>
> LayoutMerge ON
> LayoutFooter "foot"     # only for test
>
> When i have easy test.php page like this all work well:
>
> <html>
> <body>
> <?
> echo "test body";
> ?>
> </body>
> </html>
>
>
> this is output from 'dog' tool:
>
> HTTP/1.1 200 OK
> Date: Fri, 23 Feb 2007 18:58:51 GMT
> Server: Apache/1.3.33 (Debian GNU/Linux) PHP/4.3.10-18 mod_layout/ 
> 3.2.1
> X-Powered-By: ModLayout/3.2.1
> Connection: close
> Content-Type: text/html
>
>
> <html>
> <body>
> test bodyfoot</body>
> </html>
>
>
> It is all ok
>
> BUT
>
> When when i use a simple php code with function header(), which  
> adds/change
> HTTP headers, it looks that mod_layout always replays the headers  
> by itself.
> I use changing HTTP headers to "image/png" value becouse i generate
> dynamic .png images by php scripts.
>
> This is second simple test.php page:
>
> <?
> Header("Content-Type: image/png");
> Header("NewHeder: value");
> ?>
>
> output from dog:
>
> HTTP/1.1 200 OK
> Date: Fri, 23 Feb 2007 19:08:43 GMT
> Server: Apache/1.3.33 (Debian GNU/Linux) PHP/4.3.10-18 mod_layout/ 
> 3.2.1
> X-Powered-By: ModLayout/3.2.1
> Connection: close
> Content-Type: text/html
>
>
> You can see no HTTP headers generated by test.php script
>
> when i turn off LayoutFooter and LayoutMerge in httpd.conf and  
> restart apache,
> dog show me:
>
> HTTP/1.1 200 OK
> Date: Fri, 23 Feb 2007 19:14:47 GMT
> Server: Apache/1.3.33 (Debian GNU/Linux) PHP/4.3.10-18 mod_layout/ 
> 3.2.1
> X-Powered-By: PHP/4.3.10-18
> NewHeder: value
> Connection: close
> Content-Type: image/png
>
>
> Any idea why mod_layout change HTTP header? I use mod_layout  
> becouse only want
> add a text or simple html code before "</body>" tag without change  
> HTTP
> headers or without change anything else....
>
> Thank you for help!!!
>
> kolisko
>
> versions on my Debian Sarge server - dpkg -l :
>
>
> ii  apache         1.3.33-6sarge3 versatile, high-performance HTTP  
> server
> ii  apache-common  1.3.33-6sarge3 support files for all Apache  
> webservers
> ii  apache-dev     1.3.33-6sarge3 development kit for the Apache  
> webserver
> ii  apache-ssl     1.3.33-6sarge3 versatile, high-performance HTTP  
> server with
> ii  apache-utils   1.3.33-6sarge3 utility programs for webservers  
> (transitiona
> ii  apache2        2.0.54-5sarge1 next generation, scalable,  
> extendable web se
> ii  apache2-common 2.0.54-5sarge1 next generation, scalable,  
> extendable web se
> ii  apache2-mpm-pr 2.0.54-5sarge1 traditional model for Apache2
> ii  apache2-utils  2.0.54-5sarge1 utility programs for webservers
> ii  libapache-mod-layout 3.2.1-2        Apache web page content  
> wrapper
> ii  libapache2-mod 4.0.1a-2.2     Apache2 web page content wrapper
> ii  libapache2-mod 4.3.10-18      server-side, HTML-embedded  
> scripting languag
> _______________________________________________
> Mod_layout mailing list
> [email protected]
> http://lists.tangent.org/mailman/listinfo/mod_layout

--
_______________________________________________________
Brian "Krow" Aker, brian at tangent.org
Seattle, Washington
http://krow.net/
http://tangent.org/
_______________________________________________________
You can't grep a dead tree.