This is an automated email from the ASF dual-hosted git repository.
bcall pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new 65ee0b1dd3 Coverity 1497381: Uninitialized scalar variable (#10493)
65ee0b1dd3 is described below
commit 65ee0b1dd32389577f1b4eca4d7399c66bb9a25f
Author: Bryan Call <[email protected]>
AuthorDate: Fri Sep 22 13:38:13 2023 -0700
Coverity 1497381: Uninitialized scalar variable (#10493)
---
proxy/http/HttpBodyFactory.cc | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/proxy/http/HttpBodyFactory.cc b/proxy/http/HttpBodyFactory.cc
index eda6f03c72..b0c0ad2912 100644
--- a/proxy/http/HttpBodyFactory.cc
+++ b/proxy/http/HttpBodyFactory.cc
@@ -78,18 +78,6 @@ HttpBodyFactory::fabricate_with_old_api(const char *type,
HttpTransact::State *c
ink_strlcpy(content_language_out_buf, "en", content_language_buf_size);
ink_strlcpy(content_type_out_buf, "text/html", content_type_buf_size);
- ///////////////////////////////////////////////
- // if suppressing this response, return NULL //
- ///////////////////////////////////////////////
- if (is_response_suppressed(context)) {
- if (enable_logging) {
- Log::error("BODY_FACTORY: suppressing '%s' response for url '%s'", type,
url);
- }
- return nullptr;
- }
-
- lock();
-
///////////////////////////////////////////////////////////////////
// if logging turned on, buffer up the URL string for simplicity //
///////////////////////////////////////////////////////////////////
@@ -109,6 +97,19 @@ HttpBodyFactory::fabricate_with_old_api(const char *type,
HttpTransact::State *c
}
}
}
+
+ ///////////////////////////////////////////////
+ // if suppressing this response, return NULL //
+ ///////////////////////////////////////////////
+ if (is_response_suppressed(context)) {
+ if (enable_logging) {
+ Log::error("BODY_FACTORY: suppressing '%s' response for url '%s'", type,
url);
+ }
+ return nullptr;
+ }
+
+ lock(); // body factory lock
+
//////////////////////////////////////////////////////////////////////////////////
// if language-targeting activated, get client Accept-Language &
Accept-Charset //
//////////////////////////////////////////////////////////////////////////////////