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

ghenzler pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/felix-dev.git


The following commit(s) were added to refs/heads/master by this push:
     new cac00cacb4 FELIX-6819 Include request method in one-liner response if 
it is not GET
cac00cacb4 is described below

commit cac00cacb49f081089ea66caa138cecfd285fb2a
Author: Georg Henzler <[email protected]>
AuthorDate: Thu Feb 5 11:55:12 2026 +0100

    FELIX-6819 Include request method in one-liner response if it is not GET
---
 .../java/org/apache/felix/hc/generalchecks/HttpRequestsCheck.java    | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git 
a/healthcheck/generalchecks/src/main/java/org/apache/felix/hc/generalchecks/HttpRequestsCheck.java
 
b/healthcheck/generalchecks/src/main/java/org/apache/felix/hc/generalchecks/HttpRequestsCheck.java
index 26b93b2822..b42ed2b6f9 100644
--- 
a/healthcheck/generalchecks/src/main/java/org/apache/felix/hc/generalchecks/HttpRequestsCheck.java
+++ 
b/healthcheck/generalchecks/src/main/java/org/apache/felix/hc/generalchecks/HttpRequestsCheck.java
@@ -270,9 +270,10 @@ public class HttpRequestsCheck implements HealthCheck {
 
     static class RequestSpec {
 
+        private static final String DEFAULT_METHOD_GET = "GET";
         private static final String HEADER_AUTHORIZATION = "Authorization";
 
-        String method = "GET";
+        String method = DEFAULT_METHOD_GET;
         String url;
         Map<String,String> headers = new HashMap<>();
         String data = null;
@@ -449,7 +450,7 @@ public class HttpRequestsCheck implements HealthCheck {
                 Result.Status status = hasFailed ? statusForFailedContraint : 
Result.Status.OK;
                 String timing = showTiming ? " " + 
msHumanReadable(response.requestDurationInMs) : "";
                 // result of response assertion(s)
-                log.add(new ResultLog.Entry(status, urlWithUser+timing+": "+ 
String.join(", ", resultBits)));
+                log.add(new ResultLog.Entry(status, 
(!DEFAULT_METHOD_GET.equals(method) ? method + " ":"") +  urlWithUser+timing+": 
"+ String.join(", ", resultBits)));
             }
 
             return log;

Reply via email to