[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#217134: Setting headers_out is somehow ignored



On Tue, Dec 16, 2003 at 01:14:37PM +0100, Mario Lang wrote:
> OK, I have spent some time investigating this problem, and
> it seems that the content-type is correctly set, but
> not correctly delivered by Apache2:
> 
> I've put the following configuration directives into
> /etc/apache2/mods-available/xslt.conf (and linked the .conf and .load):
> 
> AddType                 application/xml         .xml
> AddOutputFilterByType   mod-xslt                application/xml
> 
> Then, I placed a file svnindex.xml into /var/www/apache2-default,
> which references a .xsl.
> When doing w3m -dump_head localhost/svnindex.xml
> I get:
> HTTP/1.1 200 OK
> Date: Tue, 16 Dec 2003 11:57:12 GMT
> Server: Apache/2.0.48 (Debian GNU/Linux) DAV/2 SVN/0.33.0 mod-xslt/1.0.0rc1
> Last-Modified: Tue, 16 Dec 2003 11:21:37 GMT
> ETag: "78958-347-318f7240"
> Accept-Ranges: bytes
> Content-Length: 839
> Connection: close
> Content-Type: application/xml
> 
> application/xml is the same type originally assigned by Apache
> before mod-xslt is run.
> 
> To verify that mod-xslt does its job right, I inserted
> WriteLog calls into src/mod-xslt.c, especailly in
> function xslt_set_headers:
> 
>                 if (stylesheet->method){
>                         writeLog(APLOG_DEBUG,"method=%s", stylesheet->method);
>                         if (strcmp((char*)stylesheet->method,"xml") == 0){
> ...
> 
> And in function xsltparse:
> 
> ...
>                                 xslt_set_headers(f->r->headers_out,f->r->pool,stylesheet);
>                                 f->r->content_encoding=apr_table_get(f->r->headers_out, "Content-Encoding");
>                                 f->r->content_type=apr_table_get(f->r->headers_out, "Content-Type");
>                                 writeLog(APLOG_DEBUG,"content-type = %s, charset = %s",apr_table_get(f->r->headers_out,"Content-Type"),apr_table_get(f->r->headers_out,"Content-Encoding"));
> ...

I did pretty much the exact thing with the debs I put up on gluck, with
the same result.

> However, this info seems to get lost on the way through apache, since
> the final document is reported to have Content-Type: application/xml,
> which is basically the Content-Type originally detected for svnindex.xml
> 
> Hope this helps anyone more familiar with the new filters
> of Apache2.  I am sort of stuck here.

You too, hey?

-- 
Daniel Stone                                                <daniels@debian.org>
Debian X Strike Force:                    http://people.debian.org/~branden/xsf/

Attachment: pgplefcvVDfkl.pgp
Description: PGP signature


Reply to: