You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Randy Terbush <ra...@zyzzyva.com> on 1996/06/19 18:38:07 UTC

run_sub_req() help please

Can someone give me some feedback regarding this problem I posted
about yesterday?

Why does the following not work as it did in previous versions?


	r->handler = "some_handler";
	run_sub_req (r);


Program received signal SIGSEGV, Segmentation fault.
0x27810 in finalize_sub_req_protocol (sub=0x93d30) at http_protocol.c:526
526         SET_BYTES_SENT (sub->main);


sub->main is NULL.

I sent the full backtrace yesterday....




Re: run_sub_req() help please

Posted by Alexei Kosut <ak...@organic.com>.
On Wed, 19 Jun 1996, Randy Terbush wrote:

> Can someone give me some feedback regarding this problem I posted
> about yesterday?
> 
> Why does the following not work as it did in previous versions?
> 
> 
> 	r->handler = "some_handler";
> 	run_sub_req (r);

Are you setting up r properly? Is r the same r you were passed by the
server, or is it some new r that you've made? If it's a new r, then you
need to do all sorts of things. (copy what the sub_req_lookup_* functions
do). Specifically, it sounds like maybe you aren't setting r->connection
properly, which SET_BYTES_SENT needs to do what it does.

> sub->main is NULL.

It sounds like you're trying to short-circuit the sub_req mechanisms in
the core, and something's getting screwed up because you're not doing it
properly.

You might try, assuming you really do have r set up correctly,
instead of run_sub_req(), calling invoke_handler() yourself. Then you
avoid all the sub_req stuff.

-- Alexei Kosut <ak...@organic.com>            The Apache HTTP Server 
   http://www.nueva.pvt.k12.ca.us/~akosut/      http://www.apache.org/