fanf 00/01/11 17:13:39
Modified: src/include ap_mmn.h scoreboard.h
src/main http_main.c
src/modules/standard mod_status.c
Log:
Revert to the 1.3.3 way of getting the server name from the scoreboard,
with a modification to make it respect the UseCanonicalName setting.
This makes things work better with mass vhosting setups.
Submitted by: Cliff Woolley <[EMAIL PROTECTED]>
Reviewed by: Tony Finch
Revision Changes Path
1.42 +4 -2 apache-1.3/src/include/ap_mmn.h
Index: ap_mmn.h
===================================================================
RCS file: /home/cvs/apache-1.3/src/include/ap_mmn.h,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- ap_mmn.h 1999/08/14 08:53:48 1.41
+++ ap_mmn.h 2000/01/12 01:13:06 1.42
@@ -226,14 +226,16 @@
* ap_base64encode_len(), ap_base64decode(),
* ap_base64decode_binary(), ap_base64decode_len(),
* ap_pbase64decode(), ap_pbase64encode()
+ * (1.3.10-dev)
+ * 20000112 - put the vhostname back into the scoreboard itself
*/
#define MODULE_MAGIC_COOKIE 0x41503133UL /* "AP13" */
#ifndef MODULE_MAGIC_NUMBER_MAJOR
-#define MODULE_MAGIC_NUMBER_MAJOR 19990320
+#define MODULE_MAGIC_NUMBER_MAJOR 20000112
#endif
-#define MODULE_MAGIC_NUMBER_MINOR 6 /* 0...n */
+#define MODULE_MAGIC_NUMBER_MINOR 0 /* 0...n */
#define MODULE_MAGIC_NUMBER MODULE_MAGIC_NUMBER_MAJOR /* backward
compat */
/* Useful for testing for features. */
1.49 +1 -0 apache-1.3/src/include/scoreboard.h
Index: scoreboard.h
===================================================================
RCS file: /home/cvs/apache-1.3/src/include/scoreboard.h,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -r1.48 -r1.49
--- scoreboard.h 1999/10/21 20:44:23 1.48
+++ scoreboard.h 2000/01/12 01:13:09 1.49
@@ -160,6 +160,7 @@
char request[64]; /* We just want an idea... */
server_rec *vhostrec; /* What virtual host is being accessed? */
/* SEE ABOVE FOR SAFE USAGE! */
+ char vhostname[32]; /* more useful status with mass vhosting */
} short_score;
typedef struct {
1.487 +2 -0 apache-1.3/src/main/http_main.c
Index: http_main.c
===================================================================
RCS file: /home/cvs/apache-1.3/src/main/http_main.c,v
retrieving revision 1.486
retrieving revision 1.487
diff -u -r1.486 -r1.487
--- http_main.c 2000/01/01 17:07:34 1.486
+++ http_main.c 2000/01/12 01:13:23 1.487
@@ -2256,6 +2256,8 @@
sizeof(ss->request));
}
ss->vhostrec = r->server;
+ ap_cpystrn(ss->vhostname, ap_get_server_name(r),
+ sizeof(ss->vhostname));
}
}
if (status == SERVER_STARTING && r == NULL) {
1.109 +2 -2 apache-1.3/src/modules/standard/mod_status.c
Index: mod_status.c
===================================================================
RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_status.c,v
retrieving revision 1.108
retrieving revision 1.109
diff -u -r1.108 -r1.109
--- mod_status.c 1999/10/21 20:45:42 1.108
+++ mod_status.c 2000/01/12 01:13:34 1.109
@@ -599,7 +599,7 @@
ap_rprintf(r, " <i>%s {%s}</i> <b>[%s]</b><br>\n\n",
score_record.client,
ap_escape_html(r->pool, score_record.request),
- vhost ? vhost->server_hostname : "(unavailable)");
+ vhost ? score_record.vhostname : "(unavailable)");
}
else { /* !no_table_report */
if (score_record.status == SERVER_DEAD)
@@ -672,7 +672,7 @@
ap_rprintf(r,
"<td>%s<td nowrap>%s<td nowrap>%s</tr>\n\n",
score_record.client,
- vhost ? vhost->server_hostname : "(unavailable)",
+ vhost ? score_record.vhostname : "(unavailable)",
ap_escape_html(r->pool, score_record.request));
} /* no_table_report */
} /* !short_report */