Skip to content

Commit

Permalink
Merge pull request #277 from jajik/fix-ping-rsp
Browse files Browse the repository at this point in the history
Fix PING-RSP State field
  • Loading branch information
jajik authored Sep 27, 2024
2 parents 4779589 + a3066c7 commit 6d264bd
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 6d264bd

Please sign in to comment.