www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kim Bisgaard <...@dmi.dk>
Subject mod_proxy/5668: Patch for streaming servers and long running cgi-scripts
Date Sat, 29 Jan 2000 16:46:14 GMT

>Number:         5668
>Category:       mod_proxy
>Synopsis:       Patch for streaming servers and long running cgi-scripts
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          change-request
>Submitter-Id:   apache
>Arrival-Date:   Sat Jan 29 08:50:00 PST 2000
>Originator:     kib@dmi.dk
>Release:        1.3.11
Apache proxy module ruins the marvelous new facility in apache 1.3 of 
delivering the output from scripts un-buffered - thus instantly. This 
property is vital in long running cgi-scripts (see bug report 4733, 1166), 
and in streaming servers (see bug report 4566)
See above emntioned bug reports.
Utilize the "Pragma: no-cache" or HTTP 1.1 "Cache-Control: no-cache" to signify
both no-caching and no-buffering in proxy module.
--- apache_1.9.11/src/modules/proxy/proxy_http.c
+++ apache_1.9.11/src/modules/proxy/proxy_http.c
@@ -472,6  +472,16 @@
      if ((datestr = ap_table_get(resp_hdrs, "URI")) != NULL)
  	ap_table_set(resp_hdrs, "URI", proxy_location_reverse_map(r, datestr));

+ /* If "Pragma: no-cache" or "Cache-Control: no-cache"
+  * set nocache and make reply un-buffered to enshure timely delivery */
+     if (((pragma = ap_table_get(resp_hdrs, "Pragma")) != NULL &&
+ 	 ap_proxy_liststr(pragma, "no-cache")) ||
+ 	((pragma = ap_table_get(resp_hdrs, "Cache-Control")) != NULL &&
+ 	 ap_proxy_liststr(pragma, "no-cache"))) {
+       nocache = 1;
+       r->connection->client->flags &= ~B_WR;
+     }

  /* check if NoCache directive on this host */
      for (i = 0; i < conf->nocaches->nelts; i++) {
 [In order for any reply to be added to the PR database, you need]
 [to include <apbugs@Apache.Org> in the Cc line and make sure the]
 [subject line starts with the report component and number, with ]
 [or without any 'Re:' prefixes (such as "general/1098:" or      ]
 ["Re: general/1098:").  If the subject doesn't match this       ]
 [pattern, your message will be misfiled and ignored.  The       ]
 ["apbugs" address is not added to the Cc line of messages from  ]
 [the database automatically because of the potential for mail   ]
 [loops.  If you do not include this Cc, your reply may be ig-   ]
 [nored unless you are responding to an explicit request from a  ]
 [developer.  Reply only with text; DO NOT SEND ATTACHMENTS!     ]

View raw message