httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pque...@apache.org
Subject svn commit: r489683 - in /httpd/mod_mbox/branches/surgery/module: mod_mbox_index.c mod_mbox_out.c
Date Fri, 22 Dec 2006 16:39:28 GMT
Author: pquerna
Date: Fri Dec 22 08:39:27 2006
New Revision: 489683

URL: http://svn.apache.org/viewvc?view=rev&rev=489683
Log:
- Merge r386818 from trunk; Conditional Get support.
- Merge r386820 from trunk; Conditional Get for the Index page and Atom Feed.

Modified:
    httpd/mod_mbox/branches/surgery/module/mod_mbox_index.c
    httpd/mod_mbox/branches/surgery/module/mod_mbox_out.c

Modified: httpd/mod_mbox/branches/surgery/module/mod_mbox_index.c
URL: http://svn.apache.org/viewvc/httpd/mod_mbox/branches/surgery/module/mod_mbox_index.c?view=diff&rev=489683&r1=489682&r2=489683
==============================================================================
--- httpd/mod_mbox/branches/surgery/module/mod_mbox_index.c (original)
+++ httpd/mod_mbox/branches/surgery/module/mod_mbox_index.c Fri Dec 22 08:39:27 2006
@@ -92,6 +92,7 @@
 
 int mbox_atom_handler(request_rec *r, mbox_cache_info *mli)
 {
+    int errstatus;
     char dstr[100];
     apr_size_t dlen;
     char *etag;
@@ -105,16 +106,21 @@
 
     ap_set_content_type(r, "application/xml; charset=utf-8");
 
-    if (r->header_only) {
-        return OK;
-    }
-
     /* Try to make the index page more cache friendly */
     ap_update_mtime(r, mli->mtime);
     ap_set_last_modified(r);
     etag = ap_make_etag(r, 1);
     apr_table_setn(r->headers_out, "ETag", etag);
-
+    
+    if (r->header_only) {
+        return OK;
+    }
+    
+    if ((errstatus = ap_meets_conditions(r)) != OK) {
+        r->status = errstatus;
+        return r->status;
+    }
+    
     ap_rputs("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n", r);
     ap_rputs("<feed xmlns=\"http://www.w3.org/2005/Atom\">\n", r);
     ap_rprintf(r, "<title>%s@%s Archives</title>\n",
@@ -138,6 +144,7 @@
 /* The default index handler, using mbox_display_static_index() */
 int mbox_index_handler(request_rec *r)
 {
+    int errstatus;
     apr_status_t rv = APR_SUCCESS;
 
     mbox_dir_cfg_t *conf;
@@ -185,6 +192,11 @@
         return OK;
     }
 
+    if ((errstatus = ap_meets_conditions(r)) != OK) {
+        r->status = errstatus;
+        return r->status;
+    }
+    
     ap_rputs("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n", r);
     ap_rputs("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"\n", r);
     ap_rputs("\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n\n", r);

Modified: httpd/mod_mbox/branches/surgery/module/mod_mbox_out.c
URL: http://svn.apache.org/viewvc/httpd/mod_mbox/branches/surgery/module/mod_mbox_out.c?view=diff&rev=489683&r1=489682&r2=489683
==============================================================================
--- httpd/mod_mbox/branches/surgery/module/mod_mbox_out.c (original)
+++ httpd/mod_mbox/branches/surgery/module/mod_mbox_out.c Fri Dec 22 08:39:27 2006
@@ -922,6 +922,7 @@
 /* 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 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);
@@ -1084,6 +1090,7 @@
 /* Display a static XHTML mail */
 apr_status_t mbox_static_message(request_rec *r, apr_file_t *f)
 {
+    int errstatus;
     mbox_dir_cfg_t *conf;
     Message *m;
 
@@ -1102,6 +1109,11 @@
         return HTTP_NOT_FOUND;
     }
 
+    if ((errstatus = ap_meets_conditions(r)) != OK) {
+            r->status = errstatus;
+            return r->status;
+    }
+    
     /* Parse multipart information */
     m->mime_msg = mbox_mime_decode_multipart(r->pool, m->raw_body,
                                              m->content_type,



Mime
View raw message