I have undefined reference errors in an Apache module. I've cut the source
code down to a minimum that reproduces the error. Below is the source for
"mod_test.c" ...
#include "httpd.h"
#include "http_config.h"
Eric, you nailed the problem down precisely.
Unfortunately while digging through the core source code it develops that
getting the document root out of the core data structures is not a 100%
reliable solution. Comments associated with the document root entries
specifically state that If the
I've reviewed the last three years of the list and I can't find a commentary on
this issue, nor was I able to find one on goofle.
Consider an incoming request which might have either an IPv4 or an IPv6
address. The module wants to know which one. It is possible to sscanf the
value in
Sorin, thank you. I now have a small chunk of code that appears to do the job.
I do not have access to an IPv6 system to test with but it does identify the
connection type correctly on my IPv4 system.
I am not sure what APR_UNIX is, but it is referenced in the Apache source.
/*
rin Manolache
wrote:
On 26/10/2021 08.18, miim wrote:
> ua_pointer = apr_table_get(r->headers_in, "User-Agent");
> /* Find out how long the Apache-supplied string is */
> ualength = strlen(ua_pointer);
If the request does not contain any user-agent then ua_po
I have a relatively simple module which is nonetheless causing Apache to
intermittently segfault.
I've added debugging trace messages to be sent to the error log, but the lack
of anything in the log at the time of the segfault leads me to think that the
error log is not flushed when a message
My thanks to everyone for their input on this problem. While I was unable to
get the backtrace and whatkilledus modules to report on failure, I isolated the
cause to the following code in the handler.
The code itself does not segfault and indeed it appears to execute properly,
retrieving
I am not sure if this is a question for this list or for the APR forum, but it
seems to me that this forum is more likely to have an answer.
To what extent can I expect a module compiled on system A to be portable to
system B:
-- if both are running the same distribution of linux, though
I used a mutex in implementing mod_spamhaus, mod_sorbscheck and mod_torcheck to
maintain consistency across threads. I have not seen problems since.
I found the Apache mutex code to be somewhat opaque, so I wrote my own. I did
find that "interesting" but after several revisions I had