httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bojan Smojver <bo...@rexursive.com>
Subject Re: [apreq-2] test tarball
Date Thu, 30 Oct 2003 23:43:17 GMT
It's been a while since I downloaded libapreq2, so maybe I'm just doing
something wrong...

I'm testing this on Fedora Core 1, Test 3 and Apache 2.0.48, compiled from source.

First a bit of background to the problem. I use mod_apreq from within my
handler, which is, of course, an Apache 2 module. In order to exercise input
filters, I do this from within my handler:

--------------------------------------------
while((status=ap_get_brigade(r->input_filters,brigade,
                             AP_MODE_READBYTES,APR_BLOCK_READ,
                             HUGE_STRING_LEN))
       !=APR_SUCCESS);
  ;/* nothing */
--------------------------------------------

The purpose of the above is to read through the entire input and in the process
have mod_apreq's filter do the "thing". That's where I get a segfault, in the
file apreq_params.c, line 301:

--------------------------------------------
    if(req->parser == NULL)
--------------------------------------------

Reason? req is NULL, so dereferencing a structure member give a segfault.

This is called from line 444 of mod_apreq.c, which is:

--------------------------------------------
    ctx->status = apreq_parse_request(req, ctx->bb);
--------------------------------------------

Meaning, for some reason req pushed into this function call is null. As far as I
can see, req is obtain like this (line 365 in the same file):

--------------------------------------------
    req = get_cfg(r)->req;
--------------------------------------------

I'm not sure if I'm doing something really stupid (this whole thing used to work
with and older version of mod_apreq from CVS) or is this something that somebody
else observed as well?

BTW, nice touch with the static build inclusion. Thanks!

Quoting Joe Schaefer <joe+gmane@sunstarsys.com>:

> The following TEST tarball 
> 
>   http://httpd.apache.org/~joes/libapreq2-2.01-dev.tar.gz
> 
> was generated with 
> 
>   % make release
> 
> Please critique its contents, test it out,
> and report success/failure here.
> 
> Thanks!
> 
> -- 
> Joe Schaefer
> 
> 


-- 
Bojan

Mime
View raw message