code cleanup
[project/uhttpd.git] / uhttpd.h
index 20ad4f8..c1b52f8 100644 (file)
--- a/uhttpd.h
+++ b/uhttpd.h
 
 #define UH_LIMIT_CLIENTS       64
 #define UH_LIMIT_HEADERS       64
-#define UH_LIMIT_MSGHEAD       4096
 
 struct config {
-       char docroot[PATH_MAX];
-       char *realm;
-       char *file;
-       char *error_handler;
-       char *cgi_prefix;
+       const char *docroot;
+       const char *realm;
+       const char *file;
+       const char *error_handler;
+       const char *cgi_prefix;
+       const char *cgi_path;
        int no_symlinks;
        int no_dirlists;
        int network_timeout;
@@ -52,6 +52,16 @@ struct config {
        int script_timeout;
 };
 
+struct path_info {
+       const char *root;
+       const char *phys;
+       const char *name;
+       const char *info;
+       const char *query;
+       int redirected;
+       struct stat stat;
+};
+
 struct auth_realm {
        struct list_head list;
        char *path;
@@ -76,7 +86,7 @@ struct http_request {
        enum http_version version;
        int redirect_status;
        char *url;
-       struct auth_realm *realm;
+       const struct auth_realm *realm;
 };
 
 struct http_response {
@@ -126,8 +136,11 @@ struct client {
        } dispatch;
 };
 
+extern char uh_buf[4096];
 extern int n_clients;
 extern struct config conf;
+extern const char * const http_versions[];
+extern const char * const http_methods[];
 
 void uh_index_add(const char *filename);