Skip to content

Commit

Permalink
Simplify Context/Alias checking for CONFIG command
Browse files Browse the repository at this point in the history
  • Loading branch information
jajik committed Sep 27, 2024
1 parent a27c692 commit de3eecf
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 @@ -1247,7 +1247,7 @@ static char *process_context_alias(char *key, char *val, apr_pool_t *p, struct c
if (strcasecmp(key, "Alias") == 0) {
char *tmp;

if (phost->host && ((!phost->context && in_config) || !in_config)) {
if (phost->host && !in_config) {
*errtype = TYPESYNTAX;
return in_config ? SALIBAD : SMULALB;
}
Expand All @@ -1272,9 +1272,9 @@ static char *process_context_alias(char *key, char *val, apr_pool_t *p, struct c
}

if (strcasecmp(key, "Context") == 0) {
if (phost->context) {
if (phost->context && !in_config) {
*errtype = TYPESYNTAX;
return in_config ? SCONBAD : SMULCTB;
return SMULCTB;
}
if (check_context_alias_length(val, CONTEXTSZ)) {
*errtype = TYPESYNTAX;
Expand Down

0 comments on commit de3eecf

Please sign in to comment.