> -----Original Message-----
> From: Jeffrey W. Baker [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 08, 2001 4:47 PM
> To: Nick Tonkin
> Cc: [EMAIL PROTECTED]
> Subject: Re: [RESEND] seg fault with Apache::URI ... weird
> 
> 
[snip]

just to put everyone on the same page, looks like this is now fixed in
1.3.19-dev?

--Geoff
 
> I've debugged the problem, but have no solution:
> 
>      my $uri = Apache::URI->parse($r, $r->uri);
> 
> This calls ap_parse_uri_components(), which is responsible for setting
> the scheme, hostname, user, password, port, path, etc.  But, 
> the scheme is
> not getting set, because the request line only contains 
> "/path" or such.
> 
>      $uri->hostname($r->get_server_name);
>      $uri->port($r->get_server_port);
> 
> These work fine.
> 
>      print $uri->unparse;
> 
> This calls ap_unparse_uri_components().  If there is a hostname but no
> scheme, ap_unparse_uri_components() will pass a null argument to
> strcasecmp, which will cause an invalid memory access and 
> SIGSEGV.  You
> can work around the problem by including 
> $uri->scheme('http'); with the
> other accessor methods.  In the long run this is probably a 
> bug in Apache.
> 
> If you read src/main/util_uri.c in Apache, you can see why 
> commenting out
> one accessor avoids the crash.
> 
> Regards,
> Jeffrey Baker
> 

Reply via email to