ASF Bugzilla – Attachment 12804 Details for
Bug 31311
Remote user not logged in reverse proxy scenario
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to retrieve remote user if available in auth headers
log_user_if_available_on_auth_headers.diff (text/plain), 955 bytes, created by
Roberto
on 2004-09-20 15:09:34 UTC
(
hide
)
Description:
Patch to retrieve remote user if available in auth headers
Filename:
MIME Type:
Creator:
Roberto
Created:
2004-09-20 15:09:34 UTC
Size:
955 bytes
patch
obsolete
>diff -ru httpd-2.0.51/modules/loggers/mod_log_config.c httpd-2.0.51.new/modules/loggers/mod_log_config.c >--- httpd-2.0.51/modules/loggers/mod_log_config.c 2004-06-01 17:30:16.000000000 +0200 >+++ httpd-2.0.51.new/modules/loggers/mod_log_config.c 2004-09-20 16:29:40.000000000 +0200 >@@ -321,10 +321,19 @@ > > static const char *log_remote_user(request_rec *r, char *a) > { >- char *rvalue = r->user; >- >- if (rvalue == NULL) { >- rvalue = "-"; >+ char *rvalue; >+ const char *sent_pw; >+ >+ if (r->user == NULL) { >+ /* Try to get user from basic authentication data if available. >+ * Useful in reverse proxy scenarios where the real servers >+ * are using basic auth and we need user logging */ >+ if (ap_get_basic_auth_pw(r, &sent_pw) == OK) { >+ rvalue = r->user; >+ } >+ else { >+ rvalue = "-"; >+ } > } > else if (strlen(rvalue) == 0) { > rvalue = "\"\"";
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 31311
: 12804