summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/main.c b/main.c
index 6cbceb7..fb27665 100644
--- a/main.c
+++ b/main.c
@@ -232,7 +232,7 @@ int main(int argc, char **argv)
init_defaults_pre();
signal(SIGPIPE, SIG_IGN);
- while ((ch = getopt(argc, argv, "A:aC:c:Dd:E:fh:I:i:K:k:L:l:m:N:n:p:qRr:Ss:T:t:U:u:Xx:y:")) != -1) {
+ while ((ch = getopt(argc, argv, "A:aC:c:Dd:E:fh:H:I:i:K:k:L:l:m:N:n:p:qRr:Ss:T:t:U:u:Xx:y:")) != -1) {
switch(ch) {
#ifdef HAVE_TLS
case 'C':
@@ -273,6 +273,14 @@ int main(int argc, char **argv)
conf.docroot = strdup(uh_buf);
break;
+ case 'H':
+ if (uh_handler_add(optarg)) {
+ fprintf(stderr, "Error: Failed to load handler script %s\n",
+ optarg);
+ exit(1);
+ }
+ break;
+
case 'E':
if (optarg[0] != '/') {
fprintf(stderr, "Error: Invalid error handler: %s\n",