On Jun 17, 2005, at 12:36 PM, Chad Leigh -- Shire.Net LLC wrote:
On Jun 17, 2005, at 12:08 PM, Chad Leigh -- Shire.Net LLC wrote:
I don't know if this is a valid test or not, but I went in to namazu-
cgi.c and added a line
if (localedir != NULL) {
bindtextdomain(PACKAGE, localedir);
} else {
bindtextdomain(PACKAGE, LOCALEDIR);
}
textdomain(PACKAGE);
freopen("cgi_output", "w", stdout);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
In looking at the other code, it appeared that stdout was used as the
output of the cgi back to apache and I wanted to capture that instead
of sending it back.
If this is valid, and it appears to be since I can run the cgi with a
known good query and the file captures all the http headers and html
that apache gets, the file is empty when run with a known bad query.
More as it develops.
Thanks to some printf() style debugging
it is dying on the line
char *converted = nmz_codeconv_external(query);
in printf_headfoot()
in
form.c
Will report more when I see what is going on.
ok, it seems to be failing here
codeconv.c
in nmz_codeconv_external()
I added the following lines
char *
nmz_codeconv_external (const char *str) {
char *tmp, *lang;
fprintf(stdout,"5 1 -- @%s(_at_)\n", str);fflush(stdout);
tmp = strdup(str);
fprintf(stdout,"5 2\n");fflush(stdout);
and here is the output (ignore the 4 4 stuff -- that is in the
other file in printf_headfoot() to show where it comes from)
4 4c
4 4c -- query=(_at_)chad@
5 1 -- @chad@
utah cgi-bin/Admin-List> (this is my shell prompt)
So we see it does not get past the tmp=strdup(str); line when str =
chad . It seems to die in strdup as the cgi_output file ends
abruptly and we do not get any fprintf() from after the call
However, when str=chad* it does
4 4a
4 4b
4 4c
4 4c -- query=(_at_)chad*@
5 1 -- @chad*@
5 2
So now I am wondering why strdup doesn't work with "chad" or "eric"
but does with "paul" for example...
Chad
Chad
Chad
---
Chad Leigh -- Shire.Net LLC
Your Web App and Email hosting provider
chad(_at_)shire(_dot_)net
_______________________________________________
Namazu-users-en mailing list
Namazu-users-en(_at_)namazu(_dot_)org
http://www.namazu.org/cgi-bin/mailman/listinfo/namazu-users-en
---
Chad Leigh -- Shire.Net LLC
Your Web App and Email hosting provider
chad(_at_)shire(_dot_)net
_______________________________________________
Namazu-users-en mailing list
Namazu-users-en(_at_)namazu(_dot_)org
http://www.namazu.org/cgi-bin/mailman/listinfo/namazu-users-en
---
Chad Leigh -- Shire.Net LLC
Your Web App and Email hosting provider
chad(_at_)shire(_dot_)net
_______________________________________________
Namazu-users-en mailing list
Namazu-users-en(_at_)namazu(_dot_)org
http://www.namazu.org/cgi-bin/mailman/listinfo/namazu-users-en