Commit 3c87fb85 authored by Ryan Bloom's avatar Ryan Bloom
Browse files

Fix a bug in mod_expires. Previous to this patch, if you

told mod_expires to add 604800 seconds to the last-modified
time, it actually added 604800 usec's to the last-modified time,
so that when looking at the response it looked like nothing
had been done.  The root of the problem was that we always compute
time in usec's, but we ask users to input sec's.  This means we
need to convert to usec's before using those values.
CS: Obtained from:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90066 13f79535-47bb-0310-9956-ffa450edef68
parent a6e9dac6
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
Changes with Apache 2.0.24-dev

  *) Fix a bug in mod_expires.  Previous to this patch, if you
     told mod_expires to add 604800 seconds to the last-modified
     time, it actually added 604800 usec's to the last-modified time,
     so that when looking at the response it looked like nothing
     had been done.  The root of the problem was that we always compute
     time in usec's, but we ask users to input sec's.  This means we
     need to convert to usec's before using those values.
     [Ryan Bloom]

  *) The worker MPM now handles shutdown and restart requests.  It
     definately isn't perfect, but we do stop the servers correctly.
     The biggest problem right now is that SIGHUP causes the server to
+2 −2
Original line number Diff line number Diff line
@@ -477,14 +477,14 @@ static int add_expires(request_rec *r)
	    return DECLINED;
	}
	base = r->finfo.mtime;
        additional = atoi(&code[1]);
        additional = atoi(&code[1]) * APR_USEC_PER_SEC;
        break;
    case 'A':
        /* there's been some discussion and it's possible that 
         * 'access time' will be stored in request structure
         */
        base = r->request_time;
        additional = atoi(&code[1]);
        additional = atoi(&code[1]) * APR_USEC_PER_SEC;
        break;
    default:
        /* expecting the add_* routines to be case-hardened this