diff --git a/uwsgi.c b/uwsgi.c index 56c319c1..00bc1137 100644 --- a/uwsgi.c +++ b/uwsgi.c @@ -386,8 +386,11 @@ int main(int argc, char *argv[], char *envp[]) { #ifdef UWSGI_ROUTING {"routing", no_argument, &uwsgi.routing, 1}, #endif + +#ifdef UWSGI_HTTP {"http", required_argument, 0, LONG_ARGS_HTTP}, {"http-only", no_argument, &uwsgi.http_only, 1}, +#endif {"mode", required_argument, 0, LONG_ARGS_MODE}, {"env", required_argument, 0, LONG_ARGS_ENV}, {"version", no_argument, 0, LONG_ARGS_MODE}, @@ -731,6 +734,7 @@ int main(int argc, char *argv[], char *envp[]) { #endif +#ifdef UWSGI_HTTP if (uwsgi.http) { char *tcp_port = strchr(uwsgi.http, ':'); if (tcp_port) { @@ -788,6 +792,7 @@ int main(int argc, char *argv[], char *envp[]) { } close(uwsgi.http_fd); } +#endif if (!no_server) { if (uwsgi.socket_name != NULL && !uwsgi.is_a_reload) { @@ -2593,9 +2598,11 @@ void manage_opt(int i, char *optarg) { exit(1); } break; +#ifdef UWSGI_HTTP case LONG_ARGS_HTTP: uwsgi.http = optarg; break; +#endif case LONG_ARGS_MODE: uwsgi.mode = optarg; break; diff --git a/uwsgiconfig.py b/uwsgiconfig.py index cf7a57ce..0b856f6f 100644 --- a/uwsgiconfig.py +++ b/uwsgiconfig.py @@ -17,6 +17,7 @@ PASTE=True MINTERPRETERS=True ASYNC=True UGREEN=True +HTTP=True EVDIS=False WSGI2=False ROUTING=False @@ -60,7 +61,7 @@ GCC = os.environ.get('CC', sysconfig.get_config_var('CC')) if not GCC: GCC = 'gcc' -gcc_list = ['utils', 'pyutils', 'protocol', 'socket', 'logging', 'wsgi_handlers', 'wsgi_headers', 'uwsgi_handlers', 'http', 'plugins', 'uwsgi'] +gcc_list = ['utils', 'pyutils', 'protocol', 'socket', 'logging', 'wsgi_handlers', 'wsgi_headers', 'uwsgi_handlers', 'plugins', 'uwsgi'] # large file support try: @@ -185,6 +186,9 @@ def unbit_setup(): global UGREEN UGREEN=False + global HTTP + HTTP=False + global EVDIS EVDIS=False @@ -300,6 +304,9 @@ def parse_vars(): else: libs.append(pcreconf) + if EVDIS: + cflags.append("-DUWSGI_HTTP") + gcc_list.append('http') if EVDIS: cflags.append("-DUWSGI_EVDIS")