mod-wsgi 6.0.3.dev1__tar.gz → 6.0.5.dev1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/PKG-INFO +1 -1
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/mod_wsgi.egg-info/PKG-INFO +1 -1
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/express/management/commands/runmodwsgi.py +18 -1
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/wsgi_remote.c +15 -53
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/wsgi_version.h +2 -2
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/CREDITS.rst +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/LICENSE +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/MANIFEST.in +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/Makefile.in +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/README-express.rst +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/README-standalone.rst +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/README.rst +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/configure +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/configure.ac +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/images/__init__.py +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/images/snake-whiskey.jpg +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/mod_wsgi.egg-info/SOURCES.txt +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/mod_wsgi.egg-info/dependency_links.txt +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/mod_wsgi.egg-info/entry_points.txt +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/mod_wsgi.egg-info/not-zip-safe +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/mod_wsgi.egg-info/top_level.txt +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/setup.cfg +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/setup.py +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/__init__.py +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/diagnostics/__init__.py +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/diagnostics/environ.py +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/diagnostics/hello.py +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/express/__init__.py +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/express/apache.py +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/express/cli.py +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/express/management/__init__.py +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/express/management/commands/__init__.py +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/express/options.py +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/express/platform.py +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/express/reloader.py +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/express/runtime.py +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/express/scripts.py +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/express/server.py +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/__init__.py +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/management/__init__.py +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/management/commands/__init__.py +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/management/commands/runmodwsgi.py +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/mod_wsgi.c +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/wsgi_adapter.c +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/wsgi_adapter.h +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/wsgi_apache.c +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/wsgi_apache.h +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/wsgi_auth.c +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/wsgi_auth.h +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/wsgi_buckets.c +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/wsgi_buckets.h +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/wsgi_config.c +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/wsgi_config.h +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/wsgi_convert.c +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/wsgi_convert.h +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/wsgi_daemon.c +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/wsgi_daemon.h +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/wsgi_dispatch.c +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/wsgi_dispatch.h +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/wsgi_environ.c +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/wsgi_environ.h +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/wsgi_execute.c +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/wsgi_execute.h +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/wsgi_gc.c +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/wsgi_gc.h +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/wsgi_input.c +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/wsgi_input.h +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/wsgi_interp.c +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/wsgi_interp.h +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/wsgi_logger.c +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/wsgi_logger.h +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/wsgi_memory.c +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/wsgi_memory.h +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/wsgi_metrics.c +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/wsgi_metrics.h +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/wsgi_module.c +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/wsgi_module.h +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/wsgi_python.h +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/wsgi_remote.h +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/wsgi_restrict.c +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/wsgi_restrict.h +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/wsgi_server.c +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/wsgi_server.h +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/wsgi_shutdown.c +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/wsgi_shutdown.h +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/wsgi_signal.c +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/wsgi_signal.h +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/wsgi_stream.c +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/wsgi_stream.h +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/wsgi_telemetry.c +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/wsgi_telemetry.h +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/wsgi_thread.c +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/wsgi_thread.h +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/wsgi_validate.c +0 -0
- {mod_wsgi-6.0.3.dev1 → mod_wsgi-6.0.5.dev1}/src/server/wsgi_validate.h +0 -0
|
@@ -7,9 +7,12 @@ import subprocess
|
|
|
7
7
|
from django.core.management.base import BaseCommand, CommandError
|
|
8
8
|
|
|
9
9
|
import mod_wsgi.express
|
|
10
|
+
import mod_wsgi.express.options
|
|
11
|
+
import mod_wsgi.express.server
|
|
10
12
|
|
|
11
13
|
def check_percentage(string):
|
|
12
|
-
|
|
14
|
+
value = float(string)
|
|
15
|
+
if value < 0 or value > 1:
|
|
13
16
|
import argparse
|
|
14
17
|
msg = '%s option value needs to be within the range 0 to 1.' % string
|
|
15
18
|
raise argparse.ArgumentTypeError(msg)
|
|
@@ -48,6 +51,20 @@ class Command(BaseCommand):
|
|
|
48
51
|
elif attr == 'default':
|
|
49
52
|
if getattr(option, attr) != ('NO', 'DEFAULT'):
|
|
50
53
|
kwargs[attr] = getattr(option, attr)
|
|
54
|
+
elif attr == 'help':
|
|
55
|
+
# optparse displays help text literally, but
|
|
56
|
+
# argparse expands it with '%'-formatting. Escape
|
|
57
|
+
# any literal '%' (e.g. the '%{GLOBAL}' token) and
|
|
58
|
+
# translate the optparse '%default'/'%prog' tokens
|
|
59
|
+
# to their argparse equivalents.
|
|
60
|
+
help_text = getattr(option, attr)
|
|
61
|
+
if help_text is not None:
|
|
62
|
+
help_text = help_text.replace('%', '%%')
|
|
63
|
+
help_text = help_text.replace(
|
|
64
|
+
'%%default', '%(default)s')
|
|
65
|
+
help_text = help_text.replace(
|
|
66
|
+
'%%prog', '%(prog)s')
|
|
67
|
+
kwargs[attr] = help_text
|
|
51
68
|
else:
|
|
52
69
|
if getattr(option, attr) is not None:
|
|
53
70
|
kwargs[attr] = getattr(option, attr)
|
|
@@ -1923,25 +1923,11 @@ static apr_status_t wsgi_socket_read(apr_socket_t *sock, void *vbuf,
|
|
|
1923
1923
|
|
|
1924
1924
|
#define WSGI_MAX_REQUEST_FRAME (16 * 1024 * 1024)
|
|
1925
1925
|
|
|
1926
|
-
/*
|
|
1927
|
-
* Size of the stack-resident preread buffer. Realistic CGI-style
|
|
1928
|
-
* environments easily fit inside this, so in the common case the
|
|
1929
|
-
* length prefix and the entire payload arrive in a single recv()
|
|
1930
|
-
* and no second syscall is needed.
|
|
1931
|
-
*/
|
|
1932
|
-
|
|
1933
|
-
#define WSGI_REQUEST_FRAME_PREREAD 4096
|
|
1934
|
-
|
|
1935
1926
|
static apr_status_t wsgi_read_strings(apr_socket_t *sock, char ***s,
|
|
1936
1927
|
apr_pool_t *p)
|
|
1937
1928
|
{
|
|
1938
1929
|
apr_status_t rv;
|
|
1939
1930
|
|
|
1940
|
-
char preread[WSGI_REQUEST_FRAME_PREREAD];
|
|
1941
|
-
apr_size_t got;
|
|
1942
|
-
apr_size_t len;
|
|
1943
|
-
apr_size_t payload_have;
|
|
1944
|
-
|
|
1945
1931
|
apr_size_t total;
|
|
1946
1932
|
|
|
1947
1933
|
apr_size_t n;
|
|
@@ -1953,31 +1939,22 @@ static apr_status_t wsgi_read_strings(apr_socket_t *sock, char ***s,
|
|
|
1953
1939
|
char *nul;
|
|
1954
1940
|
|
|
1955
1941
|
/*
|
|
1956
|
-
*
|
|
1957
|
-
*
|
|
1958
|
-
*
|
|
1942
|
+
* Read the length prefix and then exactly that many payload bytes.
|
|
1943
|
+
* Both reads are bounded to the framed size on purpose. The request
|
|
1944
|
+
* body that the Apache child sends immediately afterwards on the
|
|
1945
|
+
* same connection is framed as chunked transfer encoding and is
|
|
1946
|
+
* consumed later by the daemon's HTTP_IN dechunk filter reading the
|
|
1947
|
+
* very same socket. Reading even one byte past the environment
|
|
1948
|
+
* frame here would swallow the leading body bytes, leaving the
|
|
1949
|
+
* dechunk filter with a truncated stream that fails the body read
|
|
1950
|
+
* with APR_INCOMPLETE. This matters when the deferred-content
|
|
1951
|
+
* handshake is disabled (script reloading off and no queue timeout),
|
|
1952
|
+
* where the child sends the environment frame and the body back to
|
|
1953
|
+
* back in a single burst.
|
|
1959
1954
|
*/
|
|
1960
1955
|
|
|
1961
|
-
|
|
1962
|
-
if ((rv = apr_socket_recv(sock, preread, &len)) != APR_SUCCESS)
|
|
1956
|
+
if ((rv = wsgi_socket_read(sock, &total, sizeof(total))) != APR_SUCCESS)
|
|
1963
1957
|
return rv;
|
|
1964
|
-
got = len;
|
|
1965
|
-
|
|
1966
|
-
/*
|
|
1967
|
-
* Top up until we have at least the length prefix. In practice
|
|
1968
|
-
* the first recv() already covers this, but stream sockets can
|
|
1969
|
-
* deliver short reads so handle the case explicitly.
|
|
1970
|
-
*/
|
|
1971
|
-
|
|
1972
|
-
while (got < sizeof(total))
|
|
1973
|
-
{
|
|
1974
|
-
len = sizeof(preread) - got;
|
|
1975
|
-
if ((rv = apr_socket_recv(sock, preread + got, &len)) != APR_SUCCESS)
|
|
1976
|
-
return rv;
|
|
1977
|
-
got += len;
|
|
1978
|
-
}
|
|
1979
|
-
|
|
1980
|
-
memcpy(&total, preread, sizeof(total));
|
|
1981
1958
|
|
|
1982
1959
|
/*
|
|
1983
1960
|
* Reject frames too small to hold the string count or larger than
|
|
@@ -1991,23 +1968,8 @@ static apr_status_t wsgi_read_strings(apr_socket_t *sock, char ***s,
|
|
|
1991
1968
|
offset = buffer;
|
|
1992
1969
|
end = buffer + total;
|
|
1993
1970
|
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
* at total defensively. Fall back to a blocking read for any
|
|
1997
|
-
* remainder that did not fit in the preread buffer.
|
|
1998
|
-
*/
|
|
1999
|
-
|
|
2000
|
-
payload_have = got - sizeof(total);
|
|
2001
|
-
if (payload_have > total)
|
|
2002
|
-
payload_have = total;
|
|
2003
|
-
memcpy(buffer, preread + sizeof(total), payload_have);
|
|
2004
|
-
|
|
2005
|
-
if (payload_have < total)
|
|
2006
|
-
{
|
|
2007
|
-
if ((rv = wsgi_socket_read(sock, buffer + payload_have,
|
|
2008
|
-
total - payload_have)) != APR_SUCCESS)
|
|
2009
|
-
return rv;
|
|
2010
|
-
}
|
|
1971
|
+
if ((rv = wsgi_socket_read(sock, buffer, total)) != APR_SUCCESS)
|
|
1972
|
+
return rv;
|
|
2011
1973
|
|
|
2012
1974
|
memcpy(&n, offset, sizeof(n));
|
|
2013
1975
|
offset += sizeof(n);
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
|
|
26
26
|
#define MOD_WSGI_MAJORVERSION_NUMBER 6
|
|
27
27
|
#define MOD_WSGI_MINORVERSION_NUMBER 0
|
|
28
|
-
#define MOD_WSGI_MICROVERSION_NUMBER
|
|
29
|
-
#define MOD_WSGI_VERSION_STRING "6.0.
|
|
28
|
+
#define MOD_WSGI_MICROVERSION_NUMBER 5
|
|
29
|
+
#define MOD_WSGI_VERSION_STRING "6.0.5.dev1"
|
|
30
30
|
|
|
31
31
|
/* ------------------------------------------------------------------------- */
|
|
32
32
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|