https://bz.apache.org/bugzilla/show_bug.cgi?id=57045
--- Comment #8 from Kurtis Rader <[email protected]> --- > This patch looks not thread-safe... It's definitely not thread-safe. I should have mentioned that this version only works reliably with MPM pre-fork; which is what I'm currently using since my site runs WordPress. I threw this together over a couple of evenings and wanted to get it out there for feedback. Assuming no one has any other problems with the code I'll add the necessary support for thread local data to make it thread-safe. > How about using ap_log_[r]data() introduced in 2.4.11? That looks like it will emit data in a non-backward compatible format. It would also mean the code can't be used with 2.2.x. For this change I'd prefer to be conservative and keep the logged format unchanged to the extent possible and remain compatible with 2.2.x. Obviously I'm changing how 0xff is represented in the error log but it's a safe bet no one will care because they've obviously never tried to use the binary data that is logged. P.S., I looked at the existing uses of ap_log_rdata() in the 2.4.16 tree and they all appear to be incorrect. The ap_log_rdata function declaration doesn't match any of the uses. Consider the sole use in modules/proxy/mod_proxy_fcgi.c: ap_log_rdata(APLOG_MARK, APLOG_TRACE8, r, "FastCGI header", farray, AP_FCGI_HEADER_LEN, 0); The only reason this compiles is because "r" is defined at function scope. If you rename "r" to "req" throughout the function it fails to compile with this error: mod_proxy_fcgi.c:577:13: error: use of undeclared identifier 'r' ap_log_rdata(APLOG_MARK, APLOG_TRACE8, req, "FastCGI header", ^ /Users/krader/brew-httpd-2.4.16/include/http_log.h:636:27: note: expanded from macro 'ap_log_rdata' P.P.S., That magic zero as the last parameter of the call rather than AP_LOG_DATA_DEFAULT is gross. -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
