diff -urN mod-xslt-1.0.5a/src/mod-xslt.c mod-xslt-1.0.5a-noencoding/src/mod-xslt.c --- mod-xslt-1.0.5a/src/mod-xslt.c 2002-10-27 19:16:41.000000000 +0100 +++ mod-xslt-1.0.5a-noencoding/src/mod-xslt.c 2003-07-23 15:11:44.000000000 +0200 @@ -113,26 +113,26 @@ void xslt_set_headers(apr_table_t *resheaders, apr_pool_t *pool, xsltStylesheetPtr stylesheet) { if (stylesheet->encoding){ - apr_table_set(resheaders, "Content-Encoding", (const char*)stylesheet->encoding); + apr_table_set(resheaders, "X-Charset", (const char*)stylesheet->encoding); } else { - apr_table_set(resheaders, "Content-Encoding", "UTF-8"); + apr_table_set(resheaders, "X-Charset", "UTF-8"); } if (stylesheet->mediaType){ - apr_table_set(resheaders, "Content-Type", apr_psprintf(pool,"%s; charset=%s",(const char*)stylesheet->mediaType,apr_table_get(resheaders,"Content-Encoding"))); + apr_table_set(resheaders, "Content-Type", apr_psprintf(pool,"%s; charset=%s",(const char*)stylesheet->mediaType,apr_table_get(resheaders,"X-Charset"))); } else { if (stylesheet->method){ if (strcmp((char*)stylesheet->method,"xml") == 0){ - apr_table_set(resheaders, "Content-Type", apr_psprintf(pool,"%s; charset=%s","text/xml",apr_table_get(resheaders,"Content-Encoding"))); + apr_table_set(resheaders, "Content-Type", apr_psprintf(pool,"%s; charset=%s","text/xml",apr_table_get(resheaders,"X-Charset"))); } else if (strcmp((char*)stylesheet->method,"html") == 0){ - apr_table_set(resheaders, "Content-Type", apr_psprintf(pool,"%s; charset=%s","text/html",apr_table_get(resheaders,"Content-Encoding"))); + apr_table_set(resheaders, "Content-Type", apr_psprintf(pool,"%s; charset=%s","text/html",apr_table_get(resheaders,"X-Charset"))); }else if (strcmp((char*)stylesheet->method,"text") == 0){ - apr_table_set(resheaders, "Content-Type", apr_psprintf(pool,"%s; charset=%s","text/plain",apr_table_get(resheaders,"Content-Encoding"))); + apr_table_set(resheaders, "Content-Type", apr_psprintf(pool,"%s; charset=%s","text/plain",apr_table_get(resheaders,"X-Charset"))); } else { - apr_table_set(resheaders, "Content-Type", apr_psprintf(pool,"%s; charset=%s","text/html",apr_table_get(resheaders,"Content-Encoding"))); + apr_table_set(resheaders, "Content-Type", apr_psprintf(pool,"%s; charset=%s","text/html",apr_table_get(resheaders,"X-Charset"))); } } else { - apr_table_set(resheaders, "Content-Type", apr_psprintf(pool,"%s; charset=%s","text/html",apr_table_get(resheaders,"Content-Encoding"))); + apr_table_set(resheaders, "Content-Type", apr_psprintf(pool,"%s; charset=%s","text/html",apr_table_get(resheaders,"X-Charset"))); } } } @@ -229,13 +229,12 @@ writeLog(APLOG_ERR,"%s could not be transformed",f->r->unparsed_uri); } else { 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,"charset = %s",apr_table_get(f->r->headers_out,"Content-Encoding")); + writeLog(APLOG_DEBUG,"charset = %s",apr_table_get(f->r->headers_out,"X-Charset")); xmlSetGenericErrorFunc(NULL, xslt_error); xsltSetGenericErrorFunc(NULL, xslt_error); - encoder = xmlFindCharEncodingHandler((const char*)apr_table_get(f->r->headers_out,"Content-Encoding")); + encoder = xmlFindCharEncodingHandler((const char*)apr_table_get(f->r->headers_out,"X-Charset")); if (encoder) { writeLog(APLOG_DEBUG,"found encoder"); output = xmlAllocOutputBuffer(encoder);