Return-Path: Delivered-To: apmail-new-httpd-archive@apache.org Received: (qmail 658 invoked by uid 500); 5 Jun 2001 19:54:57 -0000 Mailing-List: contact new-httpd-help@apache.org; run by ezmlm Precedence: bulk Reply-To: new-httpd@apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list new-httpd@apache.org Received: (qmail 625 invoked from network); 5 Jun 2001 19:54:56 -0000 Date: Tue, 5 Jun 2001 12:54:59 -0700 (PDT) From: dean gaudet To: Subject: Re: [PATCH] Remove ap_parseHTTPdate In-Reply-To: <20010604234300.B21860@ebuilt.com> Message-ID: X-comment: visit http://arctic.org/~dean/legal for information regarding copyright and disclaimer. MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N this would seem like an OK time to change the function name to something more in line with other names in ap/apr... such as ap_parse_http_date. (but include a comment indicating the old name somewhere so it's easy to find for those of us who grok foreign programs by doing recursive greps :) -dean On Mon, 4 Jun 2001, Justin Erenkrantz wrote: > This is the httpd-2.0 companion patch for the date functions that have > already been moved to apr-util. > > You'll also need to place the following files in the Attic: > include/util_date.h > server/util_date.c > test/test_date.c > > The summary for those who might need to update modules: > > ap_parseHTTPdate -> apr_parseHTTPdate > BAD_DATE -> APR_DATE_BAD > > Compiles and runs fine here. Let me know if you run into any > problems. -- justin > > Index: modules/http/http_protocol.c > =================================================================== > RCS file: /home/cvspublic/httpd-2.0/modules/http/http_protocol.c,v > retrieving revision 1.321 > diff -u -r1.321 http_protocol.c > --- modules/http/http_protocol.c 2001/05/17 18:04:18 1.321 > +++ modules/http/http_protocol.c 2001/06/05 06:35:37 > @@ -86,7 +86,7 @@ > #include "http_vhost.h" > #include "http_log.h" /* For errors detected in basic auth common > * support code... */ > -#include "util_date.h" /* For parseHTTPdate and BAD_DATE */ > +#include "apr_date.h" /* For apr_parseHTTPdate and APR_DATE_BAD */ > #include "util_charset.h" > #include "util_ebcdic.h" > > @@ -235,9 +235,9 @@ > */ > if_unmodified = apr_table_get(r->headers_in, "If-Unmodified-Since"); > if (if_unmodified != NULL) { > - apr_time_t ius = ap_parseHTTPdate(if_unmodified); > + apr_time_t ius = apr_parseHTTPdate(if_unmodified); > > - if ((ius != BAD_DATE) && (mtime > ius)) { > + if ((ius != APR_DATE_BAD) && (mtime > ius)) { > return HTTP_PRECONDITION_FAILED; > } > } > @@ -290,7 +290,7 @@ > && ((if_modified_since = > apr_table_get(r->headers_in, > "If-Modified-Since")) != NULL)) { > - apr_time_t ims = ap_parseHTTPdate(if_modified_since); > + apr_time_t ims = apr_parseHTTPdate(if_modified_since); > > if ((ims >= mtime) && (ims <= r->request_time)) { > return HTTP_NOT_MODIFIED; > Index: server/Makefile.in > =================================================================== > RCS file: /home/cvspublic/httpd-2.0/server/Makefile.in,v > retrieving revision 1.45 > diff -u -r1.45 Makefile.in > --- server/Makefile.in 2001/05/22 01:35:52 1.45 > +++ server/Makefile.in 2001/06/05 06:35:45 > @@ -9,7 +9,7 @@ > LTLIBRARY_NAME = libmain.la > LTLIBRARY_SOURCES = \ > test_char.h \ > - config.c log.c main.c vhost.c util.c util_date.c \ > + config.c log.c main.c vhost.c util.c \ > util_script.c util_md5.c util_cfgtree.c util_ebcdic.c \ > rfc1413.c connection.c listen.c \ > mpm_common.c util_charset.c util_debug.c util_xml.c \ > Index: server/protocol.c > =================================================================== > RCS file: /home/cvspublic/httpd-2.0/server/protocol.c,v > retrieving revision 1.22 > diff -u -r1.22 protocol.c > --- server/protocol.c 2001/05/22 01:31:11 1.22 > +++ server/protocol.c 2001/06/05 06:35:45 > @@ -86,7 +86,6 @@ > #include "http_vhost.h" > #include "http_log.h" /* For errors detected in basic auth common > * support code... */ > -#include "util_date.h" /* For parseHTTPdate and BAD_DATE */ > #include "util_charset.h" > #include "util_ebcdic.h" > > Index: server/util_script.c > =================================================================== > RCS file: /home/cvspublic/httpd-2.0/server/util_script.c,v > retrieving revision 1.57 > diff -u -r1.57 util_script.c > --- server/util_script.c 2001/05/08 20:55:23 1.57 > +++ server/util_script.c 2001/06/05 06:35:45 > @@ -77,7 +77,7 @@ > #include "http_protocol.h" > #include "http_request.h" /* for sub_req_lookup_uri() */ > #include "util_script.h" > -#include "util_date.h" /* For parseHTTPdate() */ > +#include "apr_date.h" /* For apr_parseHTTPdate() */ > #include "util_ebcdic.h" > > #ifdef OS2 > @@ -546,7 +546,7 @@ > * pass it on blindly because of restrictions on future values. > */ > else if (!strcasecmp(w, "Last-Modified")) { > - ap_update_mtime(r, ap_parseHTTPdate(l)); > + ap_update_mtime(r, apr_parseHTTPdate(l)); > ap_set_last_modified(r); > } > else if (!strcasecmp(w, "Set-Cookie")) { > >