X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fuhttpd.git;a=blobdiff_plain;f=uhttpd.h;h=20ad4f8d63d96b3fed3764bd876f7fa01d55418a;hp=0c1cd8b6165d46850bcb35287b00819e7512cb0d;hb=80d64072a6ffe5a3175742a6759741b8c82f0995;hpb=5ddf71b3638788f8d1dd1d312ec79acfac7f3e74;ds=sidebyside diff --git a/uhttpd.h b/uhttpd.h index 0c1cd8b..20ad4f8 100644 --- a/uhttpd.h +++ b/uhttpd.h @@ -28,6 +28,7 @@ #include #include #include +#include #include "utils.h" @@ -40,6 +41,7 @@ struct config { char *realm; char *file; char *error_handler; + char *cgi_prefix; int no_symlinks; int no_dirlists; int network_timeout; @@ -47,13 +49,14 @@ struct config { int tcp_keepalive; int max_requests; int http_keepalive; + int script_timeout; }; struct auth_realm { struct list_head list; - char path[PATH_MAX]; - char user[32]; - char pass[128]; + char *path; + char *user; + char *pass; }; enum http_method { @@ -99,12 +102,7 @@ struct client { #ifdef HAVE_TLS struct ustream_ssl stream_ssl; #endif - struct uloop_fd rpipe; - struct uloop_fd wpipe; - struct uloop_process proc; struct uloop_timeout timeout; - bool (*cb)(struct client *); - void *priv; enum client_state state; @@ -115,15 +113,17 @@ struct client { struct blob_buf hdr; - void (*dispatch_write_cb)(struct client *cl); - void (*dispatch_free)(struct client *cl); - - union { - struct { - struct blob_attr **hdr; - int fd; - } file; - } data; + struct { + void (*write_cb)(struct client *cl); + void (*close_fds)(struct client *cl); + void (*free)(struct client *cl); + union { + struct { + struct blob_attr **hdr; + int fd; + } file; + }; + } dispatch; }; extern int n_clients; @@ -155,4 +155,7 @@ void uh_handle_file_request(struct client *cl); void uh_auth_add(const char *path, const char *user, const char *pass); +void uh_close_listen_fds(void); +void uh_close_fds(void); + #endif