You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mod_python-commits@quetz.apache.org by gr...@apache.org on 2006/11/23 01:37:27 UTC

svn commit: r478410 - /httpd/mod_python/trunk/Doc/modpython4.tex

Author: grahamd
Date: Wed Nov 22 16:37:26 2006
New Revision: 478410

URL: http://svn.apache.org/viewvc?view=rev&rev=478410
Log:
Updated documentation of the req.meets_condition() member function to show
req.update_mtime() and req.set_last_modified() in example.


Modified:
    httpd/mod_python/trunk/Doc/modpython4.tex

Modified: httpd/mod_python/trunk/Doc/modpython4.tex
URL: http://svn.apache.org/viewvc/httpd/mod_python/trunk/Doc/modpython4.tex?view=diff&rev=478410&r1=478409&r2=478410
==============================================================================
--- httpd/mod_python/trunk/Doc/modpython4.tex (original)
+++ httpd/mod_python/trunk/Doc/modpython4.tex Wed Nov 22 16:37:26 2006
@@ -788,19 +788,20 @@
 \end{methoddesc}
 
 \begin{methoddesc}[request]{meets_conditions}{}
-  Calls the Apache \cfunction{ap_meets_conditions()} function which
-  returns a status code.  If \var{status} is \constant{apache.OK}, generate
-  the content of the response normally.  If not, simply return \var{status}.
-  Note that \member{req.headers_out} should be set prior to calling this
-  function.  The same goes for \member{req.status} if the status differs
-  from \constant{apache.OK}.
+  Calls the Apache \cfunction{ap_meets_conditions()} function which returns
+  a status code. If \var{status} is \constant{apache.OK}, generate the
+  content of the response normally. If not, simply return \var{status}.
+  Note that \var{mtime} (and possibly the ETag header) should be set as
+  appropriate prior to calling this function. The same goes for
+  \member{req.status} if the status differs from \constant{apache.OK}.
 
   Example:
   \begin{verbatim}
 ...
-r.headers_out['ETag'] = "1130794f-3774-4584-a4ea-0ab19e684268"
-r.headers_out['Last-Modified'] = 'Wed, 23 Feb 2005 00:00:00 GMT'
+r.headers_out['ETag'] = '"1130794f-3774-4584-a4ea-0ab19e684268"'
 r.headers_out['Expires'] = 'Mon, 18 Apr 2005 17:30:00 GMT'
+r.update_mtime(1000000000)
+r.set_last_modified()
 
 status = r.meets_conditions()
 if status != apache.OK: