Bug 12574 - Broken images comes from mod_proxy when caching www.google.com.ru
Summary: Broken images comes from mod_proxy when caching www.google.com.ru
Status: RESOLVED WORKSFORME
Alias: None
Product: Apache httpd-1.3
Classification: Unclassified
Component: mod_proxy (show other bugs)
Version: 1.3.26
Hardware: All All
: P3 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL: http://www.google.com.ru
Keywords: PatchAvailable
Depends on:
Blocks:
 
Reported: 2002-09-12 13:25 UTC by Sergey
Modified: 2007-08-02 11:35 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey 2002-09-12 13:25:18 UTC
Hello.

There is a problem with images loaded from www.google.com.ru via mod_proxy
cache. Basically, they are _not_ cached and looks good because of
2038 year.

--- src/main/util_date.c.orig   Wed Sep 11 23:37:25 2002
+++ src/main/util_date.c        Wed Sep 11 11:15:44 2002
@@ -146,7 +146,7 @@
 
     year = t->tm_year;
 
-    if (year < 70 || ((sizeof(time_t) <= 4) && (year >= 138)))
+    if (year < 70 || ((sizeof(time_t) <= 4) && (year > 138)))
        return BAD_DATE;
 
     /* shift new year to 1st March in order to make leap year calc easy */

Second, after this patch they are broken during refresh (304) due to 2 errorneus
http headers coming from GWS/2.0:
Content-Type: text/html
Content-Length: 0

The most simple way to fix just remove this headers.

@@ -530,6 +530,11 @@
         resp_hdrs = ap_make_table(p, 20);
     }
 
+    if (r->status == HTTP_NOT_MODIFIED) {
+      ap_table_unset(resp_hdrs,"Content-Type");
+      ap_table_unset(resp_hdrs,"Content-Length");
+    }
+
     ap_kill_timeout(r);
 
     /*

With best regards, Sergey.
Comment 1 Jeff Trawick 2003-11-21 18:07:48 UTC
I'm going through the bug db to make sure patches are findable.  Please see 
http://httpd.apache.org/dev/patches.html