You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by bc...@apache.org on 2019/02/12 00:42:56 UTC

[trafficserver] 02/05: Fix ATS does not honor proxy.config.body_factory.response_max_size

This is an automated email from the ASF dual-hosted git repository.

bcall pushed a commit to branch 8.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 0a90b58b8912b6222ee637306fe2d30d72d5696a
Author: Shinya Kawano <sk...@yahoo-corp.jp>
AuthorDate: Thu Jan 17 15:56:10 2019 +0900

    Fix ATS does not honor proxy.config.body_factory.response_max_size
    
    (cherry picked from commit 854324af36f615a71ef4265f4a7c6ee8f40f42cd)
---
 proxy/http/HttpTransact.cc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc
index 64bee4e..10b5548 100644
--- a/proxy/http/HttpTransact.cc
+++ b/proxy/http/HttpTransact.cc
@@ -7911,9 +7911,9 @@ HttpTransact::build_error_response(State *s, HTTPStatus status_code, const char
   int64_t len;
   char *new_msg;
 
-  new_msg = body_factory->fabricate_with_old_api(error_body_type, s, 8192, &len, body_language, sizeof(body_language), body_type,
-                                                 sizeof(body_type), s->internal_msg_buffer_size,
-                                                 s->internal_msg_buffer_size ? s->internal_msg_buffer : nullptr);
+  new_msg = body_factory->fabricate_with_old_api(
+    error_body_type, s, s->http_config_param->body_factory_response_max_size, &len, body_language, sizeof(body_language), body_type,
+    sizeof(body_type), s->internal_msg_buffer_size, s->internal_msg_buffer_size ? s->internal_msg_buffer : nullptr);
 
   // After the body factory is called, a new "body" is allocated, and we must replace it. It is
   // unfortunate that there's no way to avoid this fabrication even when there is no substitutions...