[Zope3-checkins] CVS: Zope3/src/zope/app/publication - ftp.py:1.2
http.py:1.9
Philipp von Weitershausen
philikon at philikon.de
Sun Mar 21 12:20:25 EST 2004
Update of /cvs-repository/Zope3/src/zope/app/publication
In directory cvs.zope.org:/tmp/cvs-serv20550/src/zope/app/publication
Modified Files:
ftp.py http.py
Log Message:
Log extra request information in the extended 'request_info'
attribute, which is commonly used by HTTP and FTP publications now.
=== Zope3/src/zope/app/publication/ftp.py 1.1 => 1.2 ===
--- Zope3/src/zope/app/publication/ftp.py:1.1 Mon Feb 3 10:08:42 2003
+++ Zope3/src/zope/app/publication/ftp.py Sun Mar 21 12:20:24 2004
@@ -36,3 +36,16 @@
raise NotFound(ob, method, request)
return mapply(getattr(view, method), (), request)
+
+ def annotateTransaction(self, txn, request, ob):
+ txn = super(FTPPublication, self).annotateTransaction(txn, request, ob)
+ request_info = [request['command']]
+ path = request.get('path', '')
+ if path:
+ request_info.append(path)
+ name = request.get('name', '')
+ if name:
+ request_info.append(name)
+ request_info = ' '.join(request_info)
+ txn.setExtendedInfo('request_info', request_info)
+ return txn
=== Zope3/src/zope/app/publication/http.py 1.8 => 1.9 ===
--- Zope3/src/zope/app/publication/http.py:1.8 Sat Mar 20 08:37:45 2004
+++ Zope3/src/zope/app/publication/http.py Sun Mar 21 12:20:24 2004
@@ -26,11 +26,8 @@
def annotateTransaction(self, txn, request, ob):
txn = super(BaseHTTPPublication, self).annotateTransaction(
txn, request, ob)
- txn.setExtendedInfo('url', request.getURL())
- txn.setExtendedInfo('method', request.method)
- # XXX note the URL path for now until we have a new UI for the
- # undo machinery
- txn.note(request["PATH_INFO"])
+ request_info = request.method + ' ' + request.getURL()
+ txn.setExtendedInfo('request_info', request_info)
return txn
class HTTPPublication(BaseHTTPPublication):
More information about the Zope3-Checkins
mailing list