httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Schaefer <joe+gm...@sunstarsys.com>
Subject Re: [apreq-2] test tarball
Date Fri, 31 Oct 2003 18:30:02 GMT
Bojan Smojver <bojan@rexursive.com> writes:

> Quoting Joe Schaefer <joe+gmane@sunstarsys.com>:
> 
> > Ugh- I was trying to get away from having "constructors" like
> > apreq_request()
> > called from mod_apreq (mainly because it made internal redirect support
> > easier).  Unfortunately I suppose it also means you can't currently use
> > httpd's filter API to insert the apreq_filter- your code would need to let
> > the constructor apreq_request() do it :-/.
> 
> OK, that sounds neat. So, I'm just stuck in the past, which is easily
> fixable. 

It's also a bug, Bojan. I never intended to "drop" support for
AddInputFilter,  it's just that our current tests don't exercise that API.
Before you change your code, could you try this patch to mod_apreq.c
and see if the segfaults go away?

Index: env/mod_apreq.c
===================================================================
RCS file: /home/cvs/httpd-apreq-2/env/mod_apreq.c,v
retrieving revision 1.35
diff -u -r1.35 mod_apreq.c
--- env/mod_apreq.c	29 Oct 2003 03:10:13 -0000	1.35
+++ env/mod_apreq.c	31 Oct 2003 18:25:50 -0000
@@ -404,7 +404,8 @@
             return ctx->status;
         }
 
-        /* assert(req); */
+        if (req == NULL)
+            req = apreq_request(r, NULL);
 
     }
     else if (!ctx->saw_eos) {
@@ -416,7 +417,8 @@
         apr_bucket *last = APR_BRIGADE_LAST(ctx->spool);
         apr_size_t total_read = 0;
 
-        /* assert(req); */
+        if (req == NULL)
+            req = apreq_request(r, NULL);
 
         while (total_read < readbytes) {
             apr_off_t len;

-- 
Joe Schaefer


Mime
View raw message