Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#15 Static GZ file not automatically updated

mod_gzip-1.3.26.1a
open
None
5
2003-09-05
2003-05-30
Hedge
No

I have an index.html file that is accessed lots of times a
second. I thought I'd try the pre-compressed option.
This works well :-

GET /index.html HTTP/1.1" 200 11648 mod_gzip:
DECLINED:STATIC_GZ_FOUND In:0 -< Out:0 = 0 pct.

However, I have also switched on the option

mod_gzip_update_static Yes

... so that when I update the index.html file, mod_gzip
should update the associated index.html.gz file
automatiocally. Unfortunately this does not happen.
The log records this:-

GET /index.html HTTP/1.1" 200 46240 mod_gzip:
SEND_AS_IS:PRECOMPRESSED_VARIANT_OUTDAT
ED In:0 -< Out:0 = 0 pct.

... and the index.html.gz file remains unaltered.

I don't know where else to see if mod_gzip is trying to
update the .gz file and failing, but if I'm asked to try
some diagnostics I'll do so.

Cheers,
Daruk

Discussion

  • Logged In: YES
    user_id=329823

    What about the rights? May the apache user overwrite this static gz file?

     
    • assigned_to: nobody --> ckruse
     
  • Logged In: NO

    Check timestamp of .gz file.
    It should be more than normal index.html.

     
  • BillT
    BillT
    2005-08-18

    Logged In: YES
    user_id=1330932

    Here's what happens with my set up (Apache 1.3.33 running
    on FreeBSD):

    If the uncompressed file (example.htm) is *created* before the
    pre-compressed file (example.htm.gz) is *created*, then
    mod_gzip will not update the pre-compressed file; although
    the uncompressed file was *modified* after the pre-
    compressed file was *created* or modified.

    The fix is to:

    1. First delete the uncompressed file.
    2. Then, FTP (or save) the uncompressed file to the server.

    Once you've done that, the uncompressed file will have a
    newer "created" date and you can skip step 1 and just FTP
    the changed, uncompressed file to the Web server without
    deleting.