httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug MacEachern <do...@covalent.net>
Subject Re: windows build & handler hook
Date Mon, 08 Jan 2001 20:29:58 GMT
what i plan todo is change ap_invoke_handler to set r->handler like so:

    const char *old_handler = r->handler;

    if (!r->handler) {
        handler = r->content_type ? r->content_type : ap_default_type(r);
        if ((p=ap_strchr_c(handler, ';')) != NULL) {
	    apr_cpystrn(hbuf, handler, sizeof hbuf);
	    p2 = hbuf+(handler-p);
	    handler = hbuf;
	    /* MIME type arguments */
            while (p2 > handler && p2[-1] == ' ')
	        --p2;		/* strip trailing spaces */
	    *p2='\0';
	}
        r->handler = handler;
    }

    result = ap_run_handler(r);

    r->handler = old_handler;

it is reset here only because it might point to hbuf[], there should be no
need for it after the response phase anyhow.  with that, the
response handler prototype can go back to the way it has always been.  i'm
going to eat lunch and then work on making that change.


Mime
View raw message