On Thu, 7 Mar 2002, Justin Erenkrantz wrote:
> On Thu, Mar 07, 2002 at 08:57:42PM -0800, [EMAIL PROTECTED] wrote:
> > well, the workaround is to set DefaultType text/html. The real problem,
> > however, seems to be the fact that only the subrequest gets the content
> > type set to text/html in this case, while the main request still has the
> > content_type set to NULL (hence it uses the default).
> >
> > I'll work on a patch that properly sets the content type to the type in
> > the var file.
>
> Shouldn't the subreq's content-type be propogated upwards when we
> do the fast_redirect? -- justin
I would think so, but on first look the r->content_type=text/html but the
request that gets passed through the filter at the end
r->content_type=NULL.
I'll keep looking at it later. I did notice that if I manually set
r->prev->content_type=mime_info.mime_type then everything 'just works'
(but is a hack like the following):
Index: modules/mappers/mod_negotiation.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/modules/mappers/mod_negotiation.c,v
retrieving revision 1.95
diff -u -r1.95 mod_negotiation.c
--- modules/mappers/mod_negotiation.c 13 Feb 2002 02:55:17 -0000 1.95
+++ modules/mappers/mod_negotiation.c 8 Mar 2002 18:13:34 -0000
@@ -939,6 +939,8 @@
get_entry(neg->pool, &accept_info, body);
set_mime_fields(&mime_info, &accept_info);
+ if( r->prev )
+ r->prev->content_type = mime_info.mime_type;
has_content = 1;
}
else if (!strncmp(buffer, "content-length:", 15)) {