projects
/
project
/
uhttpd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
proc: expose HTTP Origin header in process environment
[project/uhttpd.git]
/
main.c
diff --git
a/main.c
b/main.c
index
ae54b69
..
fb27665
100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-232,7
+232,7
@@
int main(int argc, char **argv)
init_defaults_pre();
signal(SIGPIPE, SIG_IGN);
init_defaults_pre();
signal(SIGPIPE, SIG_IGN);
- while ((ch = getopt(argc, argv, "
afqSDRXC:K:E:I:p:s:h:c:l:L:d:r:m:n:N:x:y:i:t:k:T:A:u:U
:")) != -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':
switch(ch) {
#ifdef HAVE_TLS
case 'C':
@@
-273,6
+273,14
@@
int main(int argc, char **argv)
conf.docroot = strdup(uh_buf);
break;
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",
case 'E':
if (optarg[0] != '/') {
fprintf(stderr, "Error: Invalid error handler: %s\n",