On Sat, 08 Apr 2006 23:29:19 +0200
Ruediger Pluem <[EMAIL PROTECTED]> wrote:
>
>
> On 04/08/2006 10:52 PM, Davi Arnaut wrote:
>
> > Program received signal SIGSEGV, Segmentation fault.
> > [Switching to Thread 46912499703168 (LWP 619)]
> > 0x0000003703470004 in strncmp () from /lib64/tls/libc.so.6
> > (gdb) bt
> > #0 0x0000003703470004 in strncmp () from /lib64/tls/libc.so.6
> > #1 0x00000000004421a5 in uri_meets_conditions (filter=
> > {scheme = 0x0, hostinfo = 0x0, user = 0x0, password = 0x0, hostname =
> > 0x0, port_str = 0x0, path = 0x651800 "/", query = 0x0, fragment = 0x0,
> > hostent = 0x0, port = 0, is_initialized = 1, dns_looked_up = 0,
> > dns_resolved = 0}, pathlen=1, url=
> > {scheme = 0x6c2800 "http", hostinfo = 0x6c2808
> > "login.yahoo.com", user = 0x0, password = 0x0, hostname = 0x6c2818
> > "login.yahoo.com", port_str = 0x0, path = 0x0, query = 0x0, fragment = 0x0,
> > hostent = 0x0, port = 0, is_initialized = 1, dns_looked_up = 0,
> > dns_resolved = 0})
>
> Very strange that path is NULL. Could you please deliver the contents of
> r->the_request and r->parsed_uri?
>
[EMAIL PROTECTED]:~$ nc localhost 80
GET http://www.foobar.bar HTTP/1.0
Breakpoint 1, ap_cache_get_providers (r=0x81d6878, conf=0x8177fc8, uri=
{scheme = 0x81d76f8 "http", hostinfo = 0x81d7700 "www.foobar.bar", user =
0x0, password = 0x0, hostname = 0x81d7710 "www.foobar.bar", port_str = 0x0,
path = 0x0, query = 0x0, fragment = 0x0, hostent = 0x0, port = 0,
is_initialized = 1, dns_looked_up = 0, dns_resolved = 0}) at cache_util.c:82
82 for (i = 0; i < conf->cacheenable->nelts; i++) {
(gdb) print r->unparsed_uri
$1 = 0x81d76e0 "http://www.foobar.bar"
(gdb) print r->parsed_uri
$2 = {scheme = 0x81d76f8 "http", hostinfo = 0x81d7700 "www.foobar.bar", user =
0x0, password = 0x0, hostname = 0x81d7710 "www.foobar.bar", port_str = 0x0,
path = 0x0, query = 0x0, fragment = 0x0, hostent = 0x0, port = 0,
is_initialized = 1, dns_looked_up = 0, dns_resolved = 0}
(gdb) print r->the_request
$3 = 0x81d7670 "GET http://www.foobar.bar HTTP/1.0"
...
(gdb) n
85 if (uri_meets_conditions(ent[i].url, ent[i].pathlen, uri)) {
(gdb) s
uri_meets_conditions (filter=
{scheme = 0x0, hostinfo = 0x0, user = 0x0, password = 0x0, hostname =
0x0, port_str = 0x0, path = 0x816a750 "/", query = 0x0, fragment = 0x0, hostent
= 0x0, port = 0, is_initialized = 1, dns_looked_up = 0, dns_resolved = 0},
pathlen=1, url=
{scheme = 0x81d76f8 "http", hostinfo = 0x81d7700 "www.foobar.bar", user =
0x0, password = 0x0, hostname = 0x81d7710 "www.foobar.bar", port_str = 0x0,
path = 0x0, query = 0x0, fragment = 0x0, hostent = 0x0, port = 0,
is_initialized = 1, dns_looked_up = 0, dns_resolved = 0}) at cache_util.c:33
33 if(filter.hostname) {
(gdb) n
43 if(filter.scheme) {
(gdb) n
53 if(filter.port_str) {
(gdb) n
62 else if(url.port_str && filter.scheme) {
(gdb) n
71 return !strncmp(filter.path, url.path, pathlen);
(gdb) print url.path
$4 = 0x0
(gdb) n
Program received signal SIGSEGV, Segmentation fault.
0x00337224 in strncmp () from /lib/tls/libc.so.6
(gdb) quit