httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@imdb.com (Rob Hartill)
Subject Re: AOL patch
Date Sun, 22 Dec 1996 19:36:08 GMT
Randy Terbush wrote:

>I'm starting to get many requests for a patch to solve this problem.
>I think it would be good to make an acceptable solution available.


An alternative patch:
Can someone with AOL access try this patch to see if it stops their
proxies caching the results. The Last-Modified date is ever changing
with an instant Expires and a "no-cache" pragma.

If that stops their proxies caching then it's a reasonable short term
response to their sabotage. I won't be able to withstand pressure to
do something from within my company for much longer, especially if they
notice patches floating around.


BTW, what's the BrowserMatch string to look for ?   "AOL"  ?


Index: http_protocol.c
===================================================================
RCS file: /export/home/cvs/apache/src/http_protocol.c,v
retrieving revision 1.4
diff -c -r1.4 http_protocol.c
*** http_protocol.c	1996/12/17 22:36:57	1.4
--- http_protocol.c	1996/12/22 20:10:08
***************
*** 263,268 ****
--- 263,271 ----
  
      if (now < 0)
          now = r->request_time;
+ /* AOL hack */
+ if (table_get(r->subprocess_env, "forceoldproto")) mtime = now + 1;
+ /* AOL hack */
  
      table_set(r->headers_out, "Last-Modified",
                gm_timestr_822(r->pool, (mtime > now) ? now : mtime));
***************
*** 877,883 ****
      
      if (!r->status_line)
          r->status_line = status_lines[index_of_response(r->status)];
!     
      bvputs(fd, SERVER_PROTOCOL, " ", r->status_line, "\015\012", NULL);
      bvputs(fd,"Date: ",gm_timestr_822 (r->pool, r->request_time),
  	   "\015\012", NULL);
--- 880,895 ----
      
      if (!r->status_line)
          r->status_line = status_lines[index_of_response(r->status)];
! 
! /* AOL hack */
! if (table_get(r->subprocess_env, "forceoldproto")) {
! set_last_modified(r, r->request_time);
! bvputs(fd, "HTTP/1.0", " ", r->status_line, "\015\012", NULL);
! bvputs(fd, "Pragma: no-cache\015\012", NULL);
! bvputs(fd, "X-Message: AOL, fix your bloody proxy code\015\012", NULL);
! r->no_cache = 1;
! } else
! /* end of AOL hack */
      bvputs(fd, SERVER_PROTOCOL, " ", r->status_line, "\015\012", NULL);
      bvputs(fd,"Date: ",gm_timestr_822 (r->pool, r->request_time),
  	   "\015\012", NULL);




Mime
View raw message