mirror of
https://github.com/apache/httpd.git
synced 2025-08-08 15:02:10 +03:00
Cleanup some needless initialization of the date variable and consolidate
the scope to only where necessary. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91206 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -756,7 +756,7 @@ static void basic_http_header_check(request_rec *r,
|
|||||||
static void basic_http_header(request_rec *r, apr_bucket_brigade *bb,
|
static void basic_http_header(request_rec *r, apr_bucket_brigade *bb,
|
||||||
const char *protocol)
|
const char *protocol)
|
||||||
{
|
{
|
||||||
char *date = NULL;
|
char *date;
|
||||||
char *tmp;
|
char *tmp;
|
||||||
header_struct h;
|
header_struct h;
|
||||||
apr_size_t len;
|
apr_size_t len;
|
||||||
@@ -1007,7 +1007,6 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_http_header_filter(
|
|||||||
apr_bucket_brigade *b)
|
apr_bucket_brigade *b)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
char *date = NULL;
|
|
||||||
request_rec *r = f->r;
|
request_rec *r = f->r;
|
||||||
const char *clheader;
|
const char *clheader;
|
||||||
const char *protocol;
|
const char *protocol;
|
||||||
@@ -1108,7 +1107,7 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_http_header_filter(
|
|||||||
* some other part of the server configuration.
|
* some other part of the server configuration.
|
||||||
*/
|
*/
|
||||||
if (r->no_cache && !apr_table_get(r->headers_out, "Expires")) {
|
if (r->no_cache && !apr_table_get(r->headers_out, "Expires")) {
|
||||||
date = apr_palloc(r->pool, APR_RFC822_DATE_LEN);
|
char *date = apr_palloc(r->pool, APR_RFC822_DATE_LEN);
|
||||||
apr_rfc822_date(date, r->request_time);
|
apr_rfc822_date(date, r->request_time);
|
||||||
apr_table_addn(r->headers_out, "Expires", date);
|
apr_table_addn(r->headers_out, "Expires", date);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user