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.

Files changed (39) hide show
  1. checksums.yaml +8 -8
  2. checksums.yaml.gz.asc +7 -7
  3. data.tar.gz.asc +7 -7
  4. data/NEWS +15 -0
  5. data/Rakefile +4 -2
  6. data/bin/passenger-install-apache2-module +10 -0
  7. data/build/debian.rb +9 -3
  8. data/build/test_basics.rb +2 -1
  9. data/debian.template/rules.template +7 -0
  10. data/doc/Users guide Apache.idmap.txt +65 -59
  11. data/doc/Users guide Apache.txt +169 -164
  12. data/doc/Users guide Standalone.idmap.txt +20 -14
  13. data/doc/Users guide Standalone.txt +38 -17
  14. data/doc/Users guide.txt +6 -6
  15. data/doc/users_guide_snippets/deployment_basics.txt +37 -0
  16. data/doc/users_guide_snippets/installation.txt +45 -26
  17. data/doc/users_guide_snippets/tips.txt +2 -2
  18. data/ext/boost/atomic/atomic.hpp +1 -1
  19. data/ext/common/ApplicationPool2/AppTypes.h +1 -1
  20. data/ext/common/ApplicationPool2/Spawner.h +17 -0
  21. data/ext/common/Constants.h +1 -1
  22. data/ext/common/Utils/Dechunker.h +12 -2
  23. data/ext/common/Utils/ProcessMetricsCollector.h +4 -2
  24. data/ext/common/Utils/VariantMap.h +21 -2
  25. data/ext/common/agents/HelperAgent/RequestHandler.cpp +8 -0
  26. data/ext/common/agents/HelperAgent/RequestHandler.h +13 -2
  27. data/ext/common/agents/Watchdog/Main.cpp +91 -2
  28. data/ext/ruby/extconf.rb +9 -0
  29. data/helper-scripts/meteor-loader.rb +10 -1
  30. data/lib/phusion_passenger.rb +1 -1
  31. data/lib/phusion_passenger/console_text_template.rb +4 -2
  32. data/lib/phusion_passenger/platform_info.rb +1 -1
  33. data/lib/phusion_passenger/platform_info/apache_detector.rb +17 -22
  34. data/test/cxx/DechunkerTest.cpp +34 -0
  35. data/test/cxx/ProcessMetricsCollectorTest.cpp +5 -3
  36. data/test/cxx/RequestHandlerTest.cpp +27 -0
  37. data/test/stub/wsgi/passenger_wsgi.py +16 -0
  38. metadata +3 -2
  39. 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.21
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-10-23 00:00:00.000000000 Z
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
- iQEcBAABAgAGBQJSZ4W4AAoJECrHRaUKISqMHvQH/0wJCsSsAZSQteL+RjgQyDC6
6
- zjusYvLirv5vHn3vOljT5R3WYPMWVkZWifBawzUN6SER5NE7xAi1HrrTFiDWWEaF
7
- 9CedhEbwo8i5ivHqeU0FT3l4ux3kOjkbruC80eYaTL+kgQURI9PTd5et7+WcUIr8
8
- 7FMczfvlraWw0VQ3AJDFm8CdYzNPvpHmYIYVP0uTp9c1hzD2vsCkrAZDrw123toq
9
- gDFXQ5m0OToPSxAGWKvVm+BAnCiZhl2Caz0Lzyuicuz8KaT8ClJEOq6hx+5s+yOs
10
- GKGAwlgCx7pohrQiOsxTDplKH/GdFzeCEcfMm3dPFUSXYCxBfcsCCoUuc1C13Wc=
11
- =0nBA
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-----