httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <...@algroup.co.uk>
Subject Re: index.html not served w/mod_autoindex active
Date Sun, 07 Jan 2001 22:22:30 GMT
Greg Stein wrote:
> 
> On Sun, Jan 07, 2001 at 02:03:56PM -0800, Jon Travis wrote:
> > On Sun, Jan 07, 2001 at 02:00:53PM -0800, Greg Stein wrote:
> >...
> > > I'm lost on this thread. Step back, and re-present it with your thoughts.
> > > What exactly is the issue with the current organization?
> >...
> > My beef is not that we are using hook based instead of running through
> > stuff defined in the module_rec.  I'm only concerned with the fact that
> > we have changed the prototype for the content generation functions.
> 
> Ah, yes. That does seem a bit gratuitous.
> 
> Ben? Any particular reason for passing that? It isn't like it is
> disappearing from "r" anytime soon.

It isn't in r. To quote...

    if (r->handler) {
        handler = r->handler;
        handler_len = strlen(handler);
    }
    else {
        handler = r->content_type ? r->content_type :
ap_default_type(r);
        if ((p = ap_strchr_c(handler, ';')) != NULL) {
	    /* MIME type arguments */
            while (p > handler && p[-1] == ' ')
	        --p;		/* strip trailing spaces */
	    handler_len = p - handler;
	}
	else {
	    handler_len = strlen(handler);
	}
    }

what we pass is handler, not r->handler. OTOH, I have introduced a bug,
I need to copy it and do the trailing space and semicolon stripping.
Ooops!

> And I'm not so sure that "well,
> everybody is going to have to deref it" is quite valid... as Jon says, we
> *do* call a bazillion funcs with just "r" as the parameter, knowing that
> everything needed is in there.

That ain't my argument. :-)

Cheers,

Ben.

--
http://www.apache-ssl.org/ben.html

"There is no limit to what a man can do or how far he can go if he
doesn't mind who gets the credit." - Robert Woodruff

Mime
View raw message