vy commented on code in PR #3902:
URL: https://github.com/apache/logging-log4j2/pull/3902#discussion_r2327579651


##########
log4j-core/src/main/java/org/apache/logging/log4j/core/appender/HttpAppender.java:
##########
@@ -123,7 +131,13 @@ public SslConfiguration getSslConfiguration() {
         }
 
         public boolean isVerifyHostname() {
-            return verifyHostname;
+            if (verifyHostname != null) {
+                return verifyHostname;
+            }
+            if (sslConfiguration != null) {
+                return sslConfiguration.isVerifyHostName();
+            }
+            return true;

Review Comment:
   I think we should simply return `verifyHostname` here, since that is the one 
what the user has configured in this builder.



##########
log4j-core/src/main/java/org/apache/logging/log4j/core/appender/HttpAppender.java:
##########
@@ -81,6 +81,14 @@ public HttpAppender build() {
                 return null; // Return null if layout is missing
             }
 
+            if (verifyHostname != null) {
+                LOGGER.warn("Http#verifyHostname is deprecated. please 
configure this on the TLS instead.");

Review Comment:
   ```suggestion
                   LOGGER.warn("`verifyHostname` attribute of `HttpAppender` is 
deprecated and ignored. Use a `TlsConfiguration` element to configure this 
attribute.");
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to