From cvs-return-26193-apmail-httpd-cvs-archive=httpd.apache.org@httpd.apache.org Fri Dec 22 16:40:21 2006 Return-Path: Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: (qmail 11296 invoked from network); 22 Dec 2006 16:40:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Dec 2006 16:40:20 -0000 Received: (qmail 82567 invoked by uid 500); 22 Dec 2006 16:40:27 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 82544 invoked by uid 500); 22 Dec 2006 16:40:26 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 82533 invoked by uid 99); 22 Dec 2006 16:40:26 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Dec 2006 08:40:26 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Dec 2006 08:40:18 -0800 Received: by eris.apache.org (Postfix, from userid 65534) id 9BF191A981A; Fri, 22 Dec 2006 08:39:28 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: cvs@httpd.apache.org From: pquerna@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20061222163928.9BF191A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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("\n", r); ap_rputs("\n", r); ap_rprintf(r, "%s@%s Archives\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("\n", r); ap_rputs("\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,