[Zope] Alpha version of mod_pcgi

Michel Pelletier michel@digicool.com
Mon, 7 Jun 1999 18:26:15 -0400


> -----Original Message-----
> From: Andrew M. Kuchling [mailto:akuchlin@mems-exchange.org]
> Sent: Monday, June 07, 1999 5:10 PM
> To: zope@zope.org
> Subject: Re: [Zope] Alpha version of mod_pcgi
> 
> 
> Amos Latteier writes:
> 
> 	The only outstanding problem that I know of is that the
> SCRIPT_NAME and PATH_INFO environment variables aren't set properly,
> and the HTML returned by Zope has bad links as a result.  This
> shouldn't be hard to fix, just requiring figuring out what Zope wants.
> 

Perhaps:

    if (!strcmp(r->protocol, "INCLUDED")) {
	ap_table_setn(e, "SCRIPT_NAME", r->uri);
	if (r->path_info && *r->path_info) {
	    ap_table_setn(e, "PATH_INFO", r->path_info);
	}
    }
    else if (!r->path_info || !*r->path_info) {
	ap_table_setn(e, "SCRIPT_NAME", r->uri);
    }
    else {
	int path_info_start = ap_find_path_info(r->uri, r->path_info);

	ap_table_setn(e, "SCRIPT_NAME",
		      ap_pstrndup(r->pool, r->uri, path_info_start));

	ap_table_setn(e, "PATH_INFO", r->path_info);
    }


From apache's src/main/util_script.c.

-Michel

> -- 
> A.M. Kuchling			http://starship.python.net/crew/amk/
> Chaos often breeds life, when order breeds habit.
>     -- Henry Brooks Adams
> 
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://www.zope.org/mailman/listinfo/zope
> 
> (For developer-specific issues, use the companion list,
> zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
>