You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by pq...@apache.org on 2006/03/18 08:31:04 UTC
svn commit: r386820 - /httpd/mod_mbox/trunk/module-2.0/mod_mbox_index.c
Author: pquerna
Date: Fri Mar 17 23:31:03 2006
New Revision: 386820
URL: http://svn.apache.org/viewcvs?rev=386820&view=rev
Log:
- Add calls to ap_meets_conditions to actually support conditional gets on the XHTML and Atom index handlers.
Modified:
httpd/mod_mbox/trunk/module-2.0/mod_mbox_index.c
Modified: httpd/mod_mbox/trunk/module-2.0/mod_mbox_index.c
URL: http://svn.apache.org/viewcvs/httpd/mod_mbox/trunk/module-2.0/mod_mbox_index.c?rev=386820&r1=386819&r2=386820&view=diff
==============================================================================
--- httpd/mod_mbox/trunk/module-2.0/mod_mbox_index.c (original)
+++ httpd/mod_mbox/trunk/module-2.0/mod_mbox_index.c Fri Mar 17 23:31:03 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;
@@ -183,6 +190,11 @@
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);