httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject cvs commit: httpd-2.0/server protocol.c
Date Sun, 25 Mar 2001 20:42:47 GMT
rbb         01/03/25 12:42:47

  Modified:    .        CHANGES
               modules/http http_protocol.c
               server   protocol.c
  Log:
  Move ap_set_last_modified to the core.  This is a potentially
  controversial change, because this is kind of HTTP specific.  However
  many protocols should be able to take advantage of this kind of
  information.  I expect that headers will need one more layer of
  indirection for multi-protocol work, but this is a small step in
  the right direction.
  
  Revision  Changes    Path
  1.149     +7 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.148
  retrieving revision 1.149
  diff -u -d -b -w -u -r1.148 -r1.149
  --- CHANGES	2001/03/25 20:07:53	1.148
  +++ CHANGES	2001/03/25 20:42:45	1.149
  @@ -1,5 +1,12 @@
   Changes with Apache 2.0.16-dev
   
  +  *) Move ap_set_last_modified to the core.  This is a potentially 
  +     controversial change, because this is kind of HTTP specific.  However
  +     many protocols should be able to take advantage of this kind of
  +     information.  I expect that headers will need one more layer of
  +     indirection for multi-protocol work, but this is a small step in
  +     the right direction.  [Ryan Bloom]
  +
     *) Enable mod_status by default.  This matches what Apache 1.3 does.
        [Ed Korthof]
   
  
  
  
  1.310     +0 -13     httpd-2.0/modules/http/http_protocol.c
  
  Index: http_protocol.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/http/http_protocol.c,v
  retrieving revision 1.309
  retrieving revision 1.310
  diff -u -d -b -w -u -r1.309 -r1.310
  --- http_protocol.c	2001/03/19 21:54:57	1.309
  +++ http_protocol.c	2001/03/25 20:42:46	1.310
  @@ -299,19 +299,6 @@
       return OK;
   }
   
  -/*
  - * This function sets the Last-Modified output header field to the value
  - * of the mtime field in the request structure - rationalized to keep it from
  - * being in the future.
  - */
  -AP_DECLARE(void) ap_set_last_modified(request_rec *r)
  -{
  -    apr_time_t mod_time = ap_rationalize_mtime(r, r->mtime);
  -    char *datestr = apr_palloc(r->pool, APR_RFC822_DATE_LEN);
  -    apr_rfc822_date(datestr, mod_time);
  -    apr_table_setn(r->headers_out, "Last-Modified", datestr);
  -}
  -
   /* Get the method number associated with the given string, assumed to
    * contain an HTTP method.  Returns M_INVALID if not recognized.
    *
  
  
  
  1.11      +13 -0     httpd-2.0/server/protocol.c
  
  Index: protocol.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/protocol.c,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -d -b -w -u -r1.10 -r1.11
  --- protocol.c	2001/03/21 02:20:00	1.10
  +++ protocol.c	2001/03/25 20:42:47	1.11
  @@ -1544,6 +1544,19 @@
       return 0;
   }
   
  +/*
  + * This function sets the Last-Modified output header field to the value
  + * of the mtime field in the request structure - rationalized to keep it from
  + * being in the future.
  + */
  +AP_DECLARE(void) ap_set_last_modified(request_rec *r)
  +{
  +    apr_time_t mod_time = ap_rationalize_mtime(r, r->mtime);
  +    char *datestr = apr_palloc(r->pool, APR_RFC822_DATE_LEN);
  +    apr_rfc822_date(datestr, mod_time);
  +    apr_table_setn(r->headers_out, "Last-Modified", datestr);
  +}
  +
   AP_IMPLEMENT_HOOK_RUN_ALL(int,post_read_request,
                             (request_rec *r),(r),OK,DECLINED)
   AP_IMPLEMENT_HOOK_RUN_ALL(int,log_transaction,
  
  
  

Mime
View raw message