[llvm-commits] CVS: llvm-www/releases/register.cgi

John Criswell criswell at cs.uiuc.edu
Mon Feb 28 09:41:44 PST 2005



Changes in directory llvm-www/releases:

register.cgi updated: 1.17 -> 1.18
---
Log message:

Grep the web server's access log for information regarding the requester.
This is a bit of a hack, IMHO.


---
Diffs of the changes:  (+10 -0)

 register.cgi |   10 ++++++++++
 1 files changed, 10 insertions(+)


Index: llvm-www/releases/register.cgi
diff -u llvm-www/releases/register.cgi:1.17 llvm-www/releases/register.cgi:1.18
--- llvm-www/releases/register.cgi:1.17	Mon Feb 28 09:57:45 2005
+++ llvm-www/releases/register.cgi	Mon Feb 28 11:41:33 2005
@@ -227,6 +227,13 @@
 		hrefer = 'unknown'
 
 	#
+	# Attempt to grab all of the relevant junk from access_log regarding
+	# this user.
+	#
+	acclog = os.popen ('tail -n 100 /etc/httpd/logs/access_log | grep ' + rhost)
+	accdata = acclog.readlines()
+
+	#
 	# Construct an email message describing the user who is downloading
 	# LLVM.
 	#
@@ -237,6 +244,9 @@
 	msg = msg + 'Organization: ' + organization + '\n'
 	msg = msg + 'Host: ' + rhost + ' (' + raddr + ')\n'
 	msg = msg + 'Plans with LLVM:\n' + plans + '\n'
+	msg = msg + '\nWeb Server Requests:\n'
+	for line in accdata:
+		msg = msg + line
 
 	#
 	# Send email to notify that someone has downloaded LLVM yet again!






More information about the llvm-commits mailing list