On Tue, May 31, 2016 at 7:35 AM, William A Rowe Jr <wrowe@rowe-clan.net> wrote:

On May 29, 2016 01:02, "Jie Gao" <J.Gao@sydney.edu.au> wrote:
>
> Hi All
>
> I wonder if anybody is looking at this issue. At the moment, the build cores even at the end of generating a Makefile.
>
> If not, I would like to get my hands dirty in an attmpt to get the ball rolling. Any help on how to get a handle on the "ip comparisons" recommended by W. Rowe Jr would be much appreciated.

Hi Jie,

At the moment, I'm still on the fence of whether this is a supportable use case (in the faux-handler for the modperl alt protocol example.)

If it is not, the fix is to drop the test from modperl.


Alternately, the test could be fixed, but that is non-trivial...

A non-request oriented alt protocol simply never examines the req_rec, 
and must not use request oriented modules like auth.  That should be 
pretty obvious.

To create a pseudo -request- handler, you would have your connection
hook handler populate the appropriate fields and insert the appropriate
protocol-specific input and output filters below the request/body filters
and run the request through the rest of the phases, performing the
auth validation at the appropriate phase of the request (post_read
would be one obvious choice.)

Otherwise, the fix is also straightforward, I can provide hints, but you can cause the fault by changing the domain name in the test case config from example 'hostname' to example 'ip addr'.  The offending code is in the backtrace.  Both ip and host lookups would test if the useragent_addr is null, and use the corresponding lookups from the conn_rec.

I sort of expect the modperl test to continue to be broken because the req_rec simply has not been fully initialized... it is not until the entire read_req hook phase is complete that all these req_rec field members have meaningful values.

But if enough folks agree we can fix the lookup to refer to the conn_rec values until useragent_addr is initialized.