Skip to content

Commit

Permalink
Fix PING-RSP State field
Browse files Browse the repository at this point in the history
  • Loading branch information
jajik committed Sep 27, 2024
1 parent 4779589 commit a3066c7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions native/mod_manager/mod_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -2442,15 +2442,15 @@ static char *process_ping(request_rec *r, const char *const *ptr, int *errtype)
int i = 0;

ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, "Processing PING");
nodeinfo.mess.id = -1;
nodeinfo.mess.id = -2;
while (ptr[i] && ptr[i][0] != '\0') {
if (strcasecmp(ptr[i], "JVMRoute") == 0) {
if (strlen(ptr[i + 1]) >= sizeof(nodeinfo.mess.JVMRoute)) {
*errtype = TYPESYNTAX;
return SROUBIG;
}
strcpy(nodeinfo.mess.JVMRoute, ptr[i + 1]);
nodeinfo.mess.id = 0;
nodeinfo.mess.id = -1;
} else if (strcasecmp(ptr[i], "Scheme") == 0) {
scheme = apr_pstrdup(r->pool, ptr[i + 1]);
} else if (strcasecmp(ptr[i], "Host") == 0) {
Expand All @@ -2464,7 +2464,7 @@ static char *process_ping(request_rec *r, const char *const *ptr, int *errtype)
i++;
i++;
}
if (nodeinfo.mess.id == -1) {
if (nodeinfo.mess.id == -2) {
/* PING scheme, host, port or just httpd */
if (scheme == NULL && host == NULL && port == NULL) {
ap_set_content_type(r, PLAINTEXT_CONTENT_TYPE);
Expand Down

0 comments on commit a3066c7

Please sign in to comment.