httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexei Kosut <ako...@hyperreal.com>
Subject cvs commit: apache/src http_protocol.c
Date Sun, 18 Aug 1996 20:26:32 GMT
akosut      96/08/18 13:26:31

  Modified:    src       http_protocol.c
  Log:
  Oops. Make If-None-Match and If-Match work again.
  
  Revision  Changes    Path
  1.38      +7 -6      apache/src/http_protocol.c
  
  Index: http_protocol.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/http_protocol.c,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -C3 -r1.37 -r1.38
  *** http_protocol.c	1996/08/15 23:41:43	1.37
  --- http_protocol.c	1996/08/18 20:26:30	1.38
  ***************
  *** 326,332 ****
    
    int set_last_modified(request_rec *r, time_t mtime)
    {
  !     char *ts, etag[MAX_STRING_LEN];
        char *if_modified_since = table_get (r->headers_in, "If-Modified-Since");
        char *if_unmodified = table_get (r->headers_in, "If-Unmodified-Since");
        char *if_nonematch = table_get (r->headers_in, "If-None-Match");
  --- 326,332 ----
    
    int set_last_modified(request_rec *r, time_t mtime)
    {
  !     char *ts, *etag, weak_etag[MAX_STRING_LEN];
        char *if_modified_since = table_get (r->headers_in, "If-Modified-Since");
        char *if_unmodified = table_get (r->headers_in, "If-Unmodified-Since");
        char *if_nonematch = table_get (r->headers_in, "If-None-Match");
  ***************
  *** 351,362 ****
         */
    
        if (r->finfo.st_mode != 0)
  !         sprintf(etag, "W/\"%lx-%lx-%lx\"", r->finfo.st_ino, r->finfo.st_size,
  ! 		mtime);
        else
  !         sprintf(etag, "W/\"%lx\"", mtime);
  !     table_set (r->headers_out, "ETag",
  ! 	       etag + ((r->request_time - mtime > 1) ? 2 : 0));
    
        /* We now do the no_cache stuff using an Expires: header (we used to
         * withhold Last-modified). However, we still want to enforce this by
  --- 351,363 ----
         */
    
        if (r->finfo.st_mode != 0)
  !         sprintf(weak_etag, "W/\"%lx-%lx-%lx\"", r->finfo.st_ino,
  ! 		r->finfo.st_size, mtime);
        else
  !         sprintf(weak_etag, "W/\"%lx\"", mtime);
  ! 
  !     etag = weak_etag + ((r->request_time - mtime > 1) ? 2 : 0);
  !     table_set (r->headers_out, "ETag", etag);
    
        /* We now do the no_cache stuff using an Expires: header (we used to
         * withhold Last-modified). However, we still want to enforce this by
  
  
  

Mime
View raw message