httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pque...@apache.org
Subject svn commit: r386818 - in /httpd/mod_mbox/trunk/module-2.0: mod_mbox.h mod_mbox_out.c
Date Sat, 18 Mar 2006 07:25:36 GMT
Author: pquerna
Date: Fri Mar 17 23:25:35 2006
New Revision: 386818

URL: http://svn.apache.org/viewcvs?rev=386818&view=rev
Log:
- Add calls to ap_meets_conditions, to properly support conditional gets from clients. Ooops.
- mbox_static_message and mbox_raw_message both return ints, not apr_status_t.

Modified:
    httpd/mod_mbox/trunk/module-2.0/mod_mbox.h
    httpd/mod_mbox/trunk/module-2.0/mod_mbox_out.c

Modified: httpd/mod_mbox/trunk/module-2.0/mod_mbox.h
URL: http://svn.apache.org/viewcvs/httpd/mod_mbox/trunk/module-2.0/mod_mbox.h?rev=386818&r1=386817&r2=386818&view=diff
==============================================================================
--- httpd/mod_mbox/trunk/module-2.0/mod_mbox.h (original)
+++ httpd/mod_mbox/trunk/module-2.0/mod_mbox.h Fri Mar 17 23:25:35 2006
@@ -113,8 +113,8 @@
 
 apr_status_t mbox_ajax_browser(request_rec *r);
 
-apr_status_t mbox_raw_message(request_rec *r, apr_file_t *f);
-apr_status_t mbox_static_message(request_rec *r, apr_file_t *f);
+int mbox_raw_message(request_rec *r, apr_file_t *f);
+int mbox_static_message(request_rec *r, apr_file_t *f);
 apr_status_t mbox_xml_message(request_rec *r, apr_file_t *f);
 
 /* CTE decoding functions */

Modified: httpd/mod_mbox/trunk/module-2.0/mod_mbox_out.c
URL: http://svn.apache.org/viewcvs/httpd/mod_mbox/trunk/module-2.0/mod_mbox_out.c?rev=386818&r1=386817&r2=386818&view=diff
==============================================================================
--- httpd/mod_mbox/trunk/module-2.0/mod_mbox_out.c (original)
+++ httpd/mod_mbox/trunk/module-2.0/mod_mbox_out.c Fri Mar 17 23:25:35 2006
@@ -920,8 +920,9 @@
 }
 
 /* Display a raw mail from cache. No processing is done here. */
-apr_status_t mbox_raw_message(request_rec *r, apr_file_t *f)
+int mbox_raw_message(request_rec *r, apr_file_t *f)
 {
+    int errstatus;
     mbox_mime_message_t *mime_part;
     Message *m;
 
@@ -945,6 +946,11 @@
         return HTTP_NOT_FOUND;
     }
 
+    if ((errstatus = ap_meets_conditions(r)) != OK) {
+        r->status = errstatus;
+        return r->status;
+    }
+
     if (!m->raw_msg) {
         ap_set_content_type(r, "text/plain");
         ap_rprintf(r, "%s", MBOX_FETCH_ERROR_STR);
@@ -1082,8 +1088,9 @@
 }
 
 /* Display a static XHTML mail */
-apr_status_t mbox_static_message(request_rec *r, apr_file_t *f)
+int mbox_static_message(request_rec *r, apr_file_t *f)
 {
+    int errstatus;
     mbox_dir_cfg_t *conf;
     Message *m;
 
@@ -1100,6 +1107,11 @@
     m = fetch_message(r, f, msgID);
     if (!m) {
         return HTTP_NOT_FOUND;
+    }
+
+    if ((errstatus = ap_meets_conditions(r)) != OK) {
+        r->status = errstatus;
+        return r->status;
     }
 
     /* Parse multipart information */



Mime
View raw message