1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-08 15:02:10 +03:00

* If a subrequest has a broken backend also set no_cache for the main request

and ensure that the chunk filter does not sent the last chunk marker in this
  case.

  modules/http/chunk_filter.c: Memorize HTTP_BAD_GATEWAY error buckets that
                               had been seen in filter context to ensure
                               that we do not sent the last chunk marker in
                               this case.
  modules/proxy/proxy_util.c : Set no_cache also for main request if we are
                               a subrequest.

  Thanks to Joe Orton and André Malo for the "invented unique pointer" trick.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@366181 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Ruediger Pluem
2006-01-05 13:46:57 +00:00
parent 30d205d8a9
commit 6afae96259
2 changed files with 20 additions and 5 deletions

View File

@@ -2137,6 +2137,12 @@ PROXY_DECLARE(void) ap_proxy_backend_broke(request_rec *r,
conn_rec *c = r->connection;
r->no_cache = 1;
/*
* If this is a subrequest, then prevent also caching of the main
* request.
*/
if (r->main)
r->main->no_cache = 1;
e = ap_bucket_error_create(HTTP_BAD_GATEWAY, NULL, c->pool,
c->bucket_alloc);
APR_BRIGADE_INSERT_TAIL(brigade, e);