Handle all (xxx)Header directives */
| 556 | |
| 557 | /* Handle all (xxx)Header directives */ |
| 558 | static const char *header_cmd(cmd_parms *cmd, void *indirconf, |
| 559 | const char *args) |
| 560 | { |
| 561 | const char *action; |
| 562 | const char *hdr; |
| 563 | const char *val; |
| 564 | const char *envclause; |
| 565 | const char *subs; |
| 566 | |
| 567 | action = ap_getword_conf(cmd->temp_pool, &args); |
| 568 | if (cmd->info == &hdr_out_onsuccess) { |
| 569 | if (!strcasecmp(action, "always")) { |
| 570 | cmd->info = &hdr_out_always; |
| 571 | action = ap_getword_conf(cmd->temp_pool, &args); |
| 572 | } |
| 573 | else if (!strcasecmp(action, "onsuccess")) { |
| 574 | action = ap_getword_conf(cmd->temp_pool, &args); |
| 575 | } |
| 576 | } |
| 577 | hdr = ap_getword_conf(cmd->pool, &args); |
| 578 | val = *args ? ap_getword_conf(cmd->pool, &args) : NULL; |
| 579 | subs = *args ? ap_getword_conf(cmd->pool, &args) : NULL; |
| 580 | envclause = *args ? ap_getword_conf(cmd->pool, &args) : NULL; |
| 581 | |
| 582 | if (*args) { |
| 583 | return apr_pstrcat(cmd->pool, cmd->cmd->name, |
| 584 | " has too many arguments", NULL); |
| 585 | } |
| 586 | |
| 587 | return header_inout_cmd(cmd, indirconf, action, hdr, val, subs, envclause); |
| 588 | } |
| 589 | |
| 590 | /* |
| 591 | * Process the tags in the format string. Tags may be format specifiers |
nothing calls this directly
no test coverage detected