passenger 4.0.21 → 4.0.23
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of passenger might be problematic. Click here for more details.
- checksums.yaml +8 -8
- checksums.yaml.gz.asc +7 -7
- data.tar.gz.asc +7 -7
- data/NEWS +15 -0
- data/Rakefile +4 -2
- data/bin/passenger-install-apache2-module +10 -0
- data/build/debian.rb +9 -3
- data/build/test_basics.rb +2 -1
- data/debian.template/rules.template +7 -0
- data/doc/Users guide Apache.idmap.txt +65 -59
- data/doc/Users guide Apache.txt +169 -164
- data/doc/Users guide Standalone.idmap.txt +20 -14
- data/doc/Users guide Standalone.txt +38 -17
- data/doc/Users guide.txt +6 -6
- data/doc/users_guide_snippets/deployment_basics.txt +37 -0
- data/doc/users_guide_snippets/installation.txt +45 -26
- data/doc/users_guide_snippets/tips.txt +2 -2
- data/ext/boost/atomic/atomic.hpp +1 -1
- data/ext/common/ApplicationPool2/AppTypes.h +1 -1
- data/ext/common/ApplicationPool2/Spawner.h +17 -0
- data/ext/common/Constants.h +1 -1
- data/ext/common/Utils/Dechunker.h +12 -2
- data/ext/common/Utils/ProcessMetricsCollector.h +4 -2
- data/ext/common/Utils/VariantMap.h +21 -2
- data/ext/common/agents/HelperAgent/RequestHandler.cpp +8 -0
- data/ext/common/agents/HelperAgent/RequestHandler.h +13 -2
- data/ext/common/agents/Watchdog/Main.cpp +91 -2
- data/ext/ruby/extconf.rb +9 -0
- data/helper-scripts/meteor-loader.rb +10 -1
- data/lib/phusion_passenger.rb +1 -1
- data/lib/phusion_passenger/console_text_template.rb +4 -2
- data/lib/phusion_passenger/platform_info.rb +1 -1
- data/lib/phusion_passenger/platform_info/apache_detector.rb +17 -22
- data/test/cxx/DechunkerTest.cpp +34 -0
- data/test/cxx/ProcessMetricsCollectorTest.cpp +5 -3
- data/test/cxx/RequestHandlerTest.cpp +27 -0
- data/test/stub/wsgi/passenger_wsgi.py +16 -0
- metadata +3 -2
- metadata.gz.asc +7 -7
@@ -50,9 +50,9 @@ namespace tut {
|
|
50
50
|
TEST_METHOD(1) {
|
51
51
|
// It collects the metrics for the given PIDs.
|
52
52
|
collector.setPsOutput(
|
53
|
-
" PID PPID %CPU RSS VSZ PGID COMMAND\n"
|
54
|
-
" 1 0 0.0 1276 2456836 1 /sbin/launchd\n"
|
55
|
-
"34678 1265 95.2 4128 2437812 34677 /bin/bash -li\n"
|
53
|
+
" PID PPID %CPU RSS VSZ PGID UID COMMAND\n"
|
54
|
+
" 1 0 0.0 1276 2456836 1 0 /sbin/launchd\n"
|
55
|
+
"34678 1265 95.2 4128 2437812 34677 123 /bin/bash -li\n"
|
56
56
|
);
|
57
57
|
vector<pid_t> pids;
|
58
58
|
pids.push_back(1);
|
@@ -66,6 +66,7 @@ namespace tut {
|
|
66
66
|
ensure_equals(result[1].cpu, 0u);
|
67
67
|
ensure_equals(result[1].rss, 1276u);
|
68
68
|
ensure_equals(result[1].processGroupId, (pid_t) 1);
|
69
|
+
ensure_equals(result[1].uid, (uid_t) 0);
|
69
70
|
ensure_equals(result[1].command, "/sbin/launchd");
|
70
71
|
|
71
72
|
ensure_equals(result[34678].pid, (pid_t) 34678);
|
@@ -73,6 +74,7 @@ namespace tut {
|
|
73
74
|
ensure_equals(result[34678].cpu, 95u);
|
74
75
|
ensure_equals(result[34678].rss, 4128u);
|
75
76
|
ensure_equals(result[34678].processGroupId, (pid_t) 34677);
|
77
|
+
ensure_equals(result[34678].uid, (uid_t) 123);
|
76
78
|
ensure_equals(result[34678].command, "/bin/bash -li");
|
77
79
|
}
|
78
80
|
|
@@ -948,6 +948,33 @@ namespace tut {
|
|
948
948
|
}
|
949
949
|
}
|
950
950
|
|
951
|
+
TEST_METHOD(52) {
|
952
|
+
set_test_name("It supports responses in chunked transfer encoding");
|
953
|
+
|
954
|
+
init();
|
955
|
+
connect();
|
956
|
+
sendHeaders(defaultHeaders,
|
957
|
+
"PASSENGER_APP_ROOT", wsgiAppPath.c_str(),
|
958
|
+
"PATH_INFO", "/chunked",
|
959
|
+
NULL
|
960
|
+
);
|
961
|
+
|
962
|
+
char buf[1024 * 10];
|
963
|
+
unsigned long long timeout = 500000;
|
964
|
+
unsigned int size;
|
965
|
+
try {
|
966
|
+
size = readExact(connection, buf, sizeof(buf), &timeout);
|
967
|
+
} catch (const TimeoutException &) {
|
968
|
+
fail("RequestHandler did not correctly handle chunked EOF!");
|
969
|
+
}
|
970
|
+
|
971
|
+
string response(buf, size);
|
972
|
+
string body = stripHeaders(response);
|
973
|
+
ensure(containsSubstring(response, "Counter: 0\n"));
|
974
|
+
ensure(containsSubstring(response, "Counter: 1\n"));
|
975
|
+
ensure(containsSubstring(response, "Counter: 2\n"));
|
976
|
+
}
|
977
|
+
|
951
978
|
// Test small response buffering.
|
952
979
|
// Test large response buffering.
|
953
980
|
}
|
@@ -60,6 +60,22 @@ def application(env, start_response):
|
|
60
60
|
i += 1
|
61
61
|
start_response(status, [('Content-Type', 'text/html'), ('Transfer-Encoding', 'chunked')])
|
62
62
|
return body()
|
63
|
+
elif path == '/chunked':
|
64
|
+
sleep_time = float(env.get('HTTP_X_SLEEP', 0.05))
|
65
|
+
count = float(env.get('HTTP_X_COUNT', 3))
|
66
|
+
def body():
|
67
|
+
i = 0
|
68
|
+
while i < count:
|
69
|
+
data = "Counter: " + str(i) + "\n"
|
70
|
+
yield("%x\r\n" % len(data))
|
71
|
+
yield(data)
|
72
|
+
yield("\r\n")
|
73
|
+
time.sleep(sleep_time)
|
74
|
+
i += 1
|
75
|
+
yield("0\r\n\r\n")
|
76
|
+
time.sleep(2)
|
77
|
+
start_response(status, [('Content-Type', 'text/html'), ('Transfer-Encoding', 'chunked')])
|
78
|
+
return body()
|
63
79
|
elif path == '/sleep':
|
64
80
|
sleep_time = float(env.get('HTTP_X_SLEEP', 5))
|
65
81
|
time.sleep(sleep_time)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: passenger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.23
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Phusion - http://www.phusion.nl/
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-11-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -247,6 +247,7 @@ files:
|
|
247
247
|
- doc/users_guide_snippets/appendix_a_about.txt
|
248
248
|
- doc/users_guide_snippets/appendix_b_terminology.txt
|
249
249
|
- doc/users_guide_snippets/appendix_c_spawning_methods.txt
|
250
|
+
- doc/users_guide_snippets/deployment_basics.txt
|
250
251
|
- doc/users_guide_snippets/enterprise_only.txt
|
251
252
|
- doc/users_guide_snippets/environment_variables.txt
|
252
253
|
- doc/users_guide_snippets/global_queueing_explained.txt
|
metadata.gz.asc
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
|
3
3
|
Comment: GPGTools - http://gpgtools.org
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
=
|
5
|
+
iQEcBAABAgAGBQJSc3k/AAoJECrHRaUKISqMosgH/03Sod2KiENmhNO3G3m3LF26
|
6
|
+
a0fo5wCklZo85o0DBB34C0WBRdwm3T1Bs5mTsdr+QCo8gZPArhM4xgzC9sCU91yF
|
7
|
+
jyuPdeb/4fczCdtnFWtWV6UoaokvbSkRT7d2OoDST0rqph7o6AnfqvnUcrme2Wx9
|
8
|
+
wK0qNo/GUrwycMnUoVdBykxXNUdM4mSZOmDIFzx1ufsqM1MNztHnboTmqLEChh0V
|
9
|
+
CdetMXp2+4GlZOqcCd1UjKTwUo8QDu46FioSIGkUfEyAvx41MPhQmHBYENguQSGd
|
10
|
+
0ObSvJIShbm1h5Gwwar/4sqDBCKTlrF6zGWmXXqObi7I7w+FWdFuEs43IidZJJM=
|
11
|
+
=hS6d
|
12
12
|
-----END PGP SIGNATURE-----
|