Return-Path: Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 97559 invoked by uid 500); 29 May 2002 07:23:12 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 97548 invoked by uid 500); 29 May 2002 07:23:12 -0000 Delivered-To: apmail-httpd-2.0-cvs@apache.org Date: 29 May 2002 07:23:11 -0000 Message-ID: <20020529072311.16108.qmail@icarus.apache.org> From: jerenkrantz@apache.org To: httpd-2.0-cvs@apache.org Subject: cvs commit: httpd-2.0/modules/filters mod_deflate.c X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N jerenkrantz 02/05/29 00:23:10 Modified: modules/filters mod_deflate.c Log: Add a note indicating what it would take to get MTIME field populated. (I did this locally, but didn't figure it was worth committing, but it's still worth noting.) Revision Changes Path 1.9 +14 -2 httpd-2.0/modules/filters/mod_deflate.c Index: mod_deflate.c =================================================================== RCS file: /home/cvs/httpd-2.0/modules/filters/mod_deflate.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- mod_deflate.c 29 May 2002 06:40:23 -0000 1.8 +++ mod_deflate.c 29 May 2002 07:23:10 -0000 1.9 @@ -329,9 +329,21 @@ return ap_pass_brigade(f->next, bb); } + /* RFC 1952 Section 2.3 dictates the gzip header: + * + * +---+---+---+---+---+---+---+---+---+---+ + * |ID1|ID2|CM |FLG| MTIME |XFL|OS | + * +---+---+---+---+---+---+---+---+---+---+ + * + * If we wish to populate in MTIME (as hinted in RFC 1952), do: + * putLong(date_array, apr_time_now() / APR_USEC_PER_SEC); + * where date_array is a char[4] and then print date_array in the + * MTIME position. + */ buf = apr_psprintf(r->pool, "%c%c%c%c%c%c%c%c%c%c", deflate_magic[0], - deflate_magic[1], Z_DEFLATED, 0 /* flags */ , 0, 0, - 0, 0 /* time */ , 0 /* xflags */ , OS_CODE); + deflate_magic[1], Z_DEFLATED, 0 /* flags */, + 0, 0, 0, 0 /* 4 chars for mtime */, + 0 /* xflags */, OS_CODE); e = apr_bucket_pool_create(buf, 10, r->pool, f->c->bucket_alloc); APR_BRIGADE_INSERT_TAIL(ctx->bb, e);