<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:v = 
"urn:schemas-microsoft-com:vml" xmlns:o = 
"urn:schemas-microsoft-com:office:office" xmlns:w = 
"urn:schemas-microsoft-com:office:word"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1250">
<META content="MSHTML 6.00.2900.2912" name=GENERATOR><!--[if !mso]>
<STYLE>v\:* {
        BEHAVIOR: url(#default#VML)
}
o\:* {
        BEHAVIOR: url(#default#VML)
}
w\:* {
        BEHAVIOR: url(#default#VML)
}
.shape {
        BEHAVIOR: url(#default#VML)
}
</STYLE>
<![endif]-->
<STYLE>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";
        color:black;}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Times New Roman";
        color:black;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Times New Roman";
        color:black;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
        {page:Section1;}
-->
</STYLE>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]--></HEAD>
<BODY lang=EN-US vLink=purple link=blue bgColor=white>
<DIV><FONT face=Arial size=2>You have not&nbsp;mentioned what your use case is 
or what data you want to store, but another possible option would be to have 
every url call the same script; that script then logs/stores the desired 
information and then passes control (redirect or direct&nbsp;call) to the target 
routine (information about the target routine can be embedded within the url so 
that the initially invoked script can appropriately route control).</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Jonathan</FONT></DIV>
<BLOCKQUOTE 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  <A title=josh@mri.com.au href="mailto:josh@mri.com.au">Joshua Burvill</A> 
  </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A title=bluepaul@earthlink.net 
  href="mailto:bluepaul@earthlink.net">'David H'</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Cc:</B> <A title=zope@zope.org 
  href="mailto:zope@zope.org">zope@zope.org</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, July 24, 2006 12:01 
AM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> RE: [Zope] Script execute with 
  every request</DIV>
  <DIV><BR></DIV>
  <DIV class=Section1>
  <P class=MsoNormal><FONT face="Times New Roman" color=black size=3><SPAN 
  style="FONT-SIZE: 12pt">Ok, so I could put a &lt;dtml-call … &gt; into my 
  standard_html_header, and any redirects do them with a call to Dieters script 
  (which may not work with future zope versions) to make sure I am keeping the 
  original request.<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Times New Roman" color=black size=3><SPAN 
  style="FONT-SIZE: 12pt"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Times New Roman" color=black size=3><SPAN 
  style="FONT-SIZE: 12pt">Hmm, is there a better solution anyone knows of? 
  <o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Times New Roman" color=black size=3><SPAN 
  style="FONT-SIZE: 12pt"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Times New Roman" color=black size=3><SPAN 
  style="FONT-SIZE: 12pt">Basically I just want to do an insert into a database 
  of some stuff from each request.<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Times New Roman" color=black size=3><SPAN 
  style="FONT-SIZE: 12pt"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Times New Roman" color=black size=3><SPAN 
  style="FONT-SIZE: 12pt">Josh<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Times New Roman" color=black size=3><SPAN 
  style="FONT-SIZE: 12pt"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <DIV>
  <DIV class=MsoNormal style="TEXT-ALIGN: center" align=center><FONT 
  face="Times New Roman" color=black size=3><SPAN 
  style="FONT-SIZE: 12pt; COLOR: windowtext">
  <HR tabIndex=-1 align=center width="100%" SIZE=2>
  </SPAN></FONT></DIV>
  <P class=MsoNormal><B><FONT face=Tahoma color=black size=2><SPAN 
  style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: windowtext; FONT-FAMILY: Tahoma">From:</SPAN></FONT></B><FONT 
  face=Tahoma color=black size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: windowtext; FONT-FAMILY: Tahoma"> David H 
  [mailto:bluepaul@earthlink.net] <BR><B><SPAN 
  style="FONT-WEIGHT: bold">Sent:</SPAN></B> Wednesday, 19 July 2006 11:27 
  AM<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> Joshua 
  Burvill<BR><B><SPAN style="FONT-WEIGHT: bold">Cc:</SPAN></B> 
  zope@zope.org<BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B> Re: 
  [Zope] Script execute with every request</SPAN></FONT><FONT color=black><SPAN 
  style="COLOR: windowtext"><o:p></o:p></SPAN></FONT></P></DIV>
  <P class=MsoNormal><FONT face="Times New Roman" color=black size=3><SPAN 
  style="FONT-SIZE: 12pt"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Times New Roman" color=black size=3><SPAN 
  style="FONT-SIZE: 12pt">Joshua Burvill wrote: <o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Times New Roman" color=black size=3><SPAN 
  style="FONT-SIZE: 12pt">Hi,<U1:P></U1:P><o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Times New Roman" color=black size=3><SPAN 
  style="FONT-SIZE: 12pt"><U1:P>&nbsp;</U1:P><o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Times New Roman" color=black size=3><SPAN 
  style="FONT-SIZE: 12pt">I’d like to log certain parts of each request into a 
  database table for every request to provide an audit 
  trail.<U1:P></U1:P><o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Times New Roman" color=black size=3><SPAN 
  style="FONT-SIZE: 12pt"><U1:P>&nbsp;</U1:P><o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Times New Roman" color=black size=3><SPAN 
  style="FONT-SIZE: 12pt">I thought of inserting a &lt;dtml-call&nbsp; xxx&gt; 
  into the standard_html_header, but when there is a RESPONSE.redirect, it will 
  not be the original request that gets 
  logged.<U1:P></U1:P><o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Times New Roman" color=black size=3><SPAN 
  style="FONT-SIZE: 12pt"><U1:P>&nbsp;</U1:P><o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Times New Roman" color=black size=3><SPAN 
  style="FONT-SIZE: 12pt">Can anyone offer any 
  suggestions?<U1:P></U1:P><o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Times New Roman" color=black size=3><SPAN 
  style="FONT-SIZE: 12pt"><U1:P>&nbsp;</U1:P><o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Times New Roman" color=black size=3><SPAN 
  style="FONT-SIZE: 12pt">Thanks, Josh<o:p></o:p></SPAN></FONT><U1:P></U1:P></P>
  <P class=MsoNormal><FONT face="Times New Roman" color=black size=3><SPAN 
  style="FONT-SIZE: 12pt"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Times New Roman" color=black size=3><SPAN 
  style="FONT-SIZE: 12pt">Dieter wrote this <BR><BR><A 
  href="http://www.dieter.handshake.de/pyprojects/zope/emulateRedirect.py">http://www.dieter.handshake.de/pyprojects/zope/emulateRedirect.py</A><BR><BR>Maybe 
  that helps. <o:p></o:p></SPAN></FONT></P></DIV><BR>
  <P><FONT size=2>--<BR>No virus found in this incoming message.<BR>Checked by 
  AVG Free Edition.<BR>Version: 7.1.394 / Virus Database: 268.10.1/391 - Release 
  Date: 18/07/2006<BR></FONT></P><BR>
  <P><FONT size=2>--<BR>No virus found in this outgoing message.<BR>Checked by 
  AVG Free Edition.<BR>Version: 7.1.394 / Virus Database: 268.10.3/395 - Release 
  Date: 21/07/2006<BR></FONT></P>
  <P>
  <HR>

  <P></P>_______________________________________________<BR>Zope maillist&nbsp; 
  -&nbsp; 
  Zope@zope.org<BR>http://mail.zope.org/mailman/listinfo/zope<BR>**&nbsp;&nbsp; 
  No cross posts or HTML encoding!&nbsp; **<BR>(Related lists - 
  <BR>&nbsp;http://mail.zope.org/mailman/listinfo/zope-announce<BR>&nbsp;http://mail.zope.org/mailman/listinfo/zope-dev 
  )<BR></BLOCKQUOTE></BODY></HTML>