passenger 2.2.14 → 2.2.15

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.

data/NEWS CHANGED
@@ -1,3 +1,33 @@
1
+ Release 2.2.15
2
+ --------------
3
+
4
+ * [Apache] Fixed incorrect temp dir cleanup by passenger-status
5
+ On some systems, running passenger-status could print the following
6
+ message:
7
+
8
+ *** Cleaning stale folder /tmp/passenger.1234
9
+
10
+ ...after which Phusion Passenger breaks because that directory is
11
+ necessary for it to function properly. The cause of this problem
12
+ has been found and has been fixed.
13
+ * [Apache] Fixed some upload handling problems
14
+ Previous versions of Phusion Passenger check whether the size of
15
+ the received upload data matches the contents of the Content-Length
16
+ header as received by the client. It turns out that there could
17
+ be a mismatch e.g. because of mod_deflate input compression, so
18
+ we can't trust Content-Length anyway and we're being too strict.
19
+ The check has now been removed.
20
+ * [Nginx] Fixed compilation issues with Nginx >= 0.7.66
21
+ Thanks to Potamianos Gregory for reporting this issue. Issue #500.
22
+ * [Nginx] Default Nginx version changed to 0.7.67
23
+ The previous default version was 0.7.65.
24
+ * Fixed more Bundler problems
25
+ Previous versions of Phusion Passenger would preload some popular
26
+ libraries such as mysql and sqlite3 in order to utilize copy-on-write
27
+ optimizations better. However this behavior conflicts with Bundler
28
+ so we've removed it.
29
+
30
+
1
31
  Release 2.2.14
2
32
  --------------
3
33
 
@@ -36,7 +36,7 @@ include PlatformInfo
36
36
  class Installer < PhusionPassenger::AbstractInstaller
37
37
  include PhusionPassenger
38
38
 
39
- NGINX_VERSION = "0.7.65"
39
+ NGINX_VERSION = "0.7.67"
40
40
 
41
41
  def dependencies
42
42
  result = [
@@ -149,8 +149,8 @@ private
149
149
  new_screen
150
150
  color_puts "<banner>PCRE (required by Nginx) not installed, downloading it...</banner>"
151
151
 
152
- basename = "pcre-8.00.tar.gz"
153
- dirname = "pcre-8.00"
152
+ basename = "pcre-8.02.tar.gz"
153
+ dirname = "pcre-8.02"
154
154
  url = "ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/#{basename}"
155
155
  File.unlink("/tmp/#{basename}") rescue nil
156
156
  FileUtils.rm_rf("/tmp/#{dirname}")
@@ -3749,7 +3749,7 @@ has no effect.</p></div>
3749
3749
  <div id="footnotes"><hr /></div>
3750
3750
  <div id="footer">
3751
3751
  <div id="footer-text">
3752
- Last updated 2010-06-04 12:07:24 CEST
3752
+ Last updated 2010-06-24 13:53:02 CEST
3753
3753
  </div>
3754
3754
  </div>
3755
3755
  </body>
@@ -2427,7 +2427,7 @@ has no effect.</p></div>
2427
2427
  <div id="footnotes"><hr /></div>
2428
2428
  <div id="footer">
2429
2429
  <div id="footer-text">
2430
- Last updated 2010-06-04 12:07:24 CEST
2430
+ Last updated 2010-06-24 13:53:02 CEST
2431
2431
  </div>
2432
2432
  </div>
2433
2433
  </body>
@@ -506,17 +506,23 @@ private:
506
506
  */
507
507
  if (expectingUploadData) {
508
508
  if (contentLength == NULL || atol(contentLength) > LARGE_UPLOAD_THRESHOLD) {
509
- uploadDataFile = receiveRequestBody(r, contentLength);
509
+ uploadDataFile = receiveRequestBody(r);
510
510
  } else {
511
511
  receiveRequestBody(r, contentLength, uploadDataMemory);
512
512
  }
513
513
  }
514
514
 
515
- if (expectingUploadData && contentLength == NULL) {
516
- /* In case of "chunked" transfer encoding, we'll set the
517
- * Content-Length header to the length of the received upload
518
- * data. Rails requires this header for its HTTP upload data
519
- * multipart parsing process.
515
+ if (expectingUploadData) {
516
+ /* We'll set the Content-Length header to the length of the
517
+ * received upload data. Rails requires this header for its
518
+ * HTTP upload data multipart parsing process.
519
+ * There are two reasons why we don't rely on the Content-Length
520
+ * header as sent by the client:
521
+ * - The client doesn't always send Content-Length, e.g. in case
522
+ * of "chunked" transfer encoding.
523
+ * - mod_deflate input compression can make it so that the
524
+ * amount of upload we receive doesn't match Content-Length:
525
+ * http://httpd.apache.org/docs/2.0/mod/mod_deflate.html#enable
520
526
  */
521
527
  if (uploadDataFile != NULL) {
522
528
  apr_table_set(r->headers_in, "Content-Length",
@@ -1088,15 +1094,11 @@ private:
1088
1094
  * Receive the HTTP upload data and buffer it into a BufferedUpload temp file.
1089
1095
  *
1090
1096
  * @param r The request.
1091
- * @param contentLength The value of the HTTP Content-Length header. This is used
1092
- * to check whether the HTTP client has sent complete upload
1093
- * data. NULL indicates that there is no Content-Length header,
1094
- * i.e. that the HTTP client used chunked transfer encoding.
1095
1097
  * @throws RuntimeException
1096
1098
  * @throws SystemException
1097
1099
  * @throws IOException
1098
1100
  */
1099
- shared_ptr<BufferedUpload> receiveRequestBody(request_rec *r, const char *contentLength) {
1101
+ shared_ptr<BufferedUpload> receiveRequestBody(request_rec *r) {
1100
1102
  TRACE_POINT();
1101
1103
  DirConfig *config = getDirConfig(r);
1102
1104
  shared_ptr<BufferedUpload> tempFile;
@@ -1121,17 +1123,6 @@ private:
1121
1123
  } while (written < (size_t) len);
1122
1124
  total_written += written;
1123
1125
  }
1124
-
1125
- if (contentLength != NULL && ftell(tempFile->handle) != atol(contentLength)) {
1126
- string message = "It looks like the browser did not finish the file upload: "
1127
- "it said it will upload ";
1128
- message.append(contentLength);
1129
- message.append(" bytes, but it closed the connection after sending ");
1130
- message.append(toString(ftell(tempFile->handle)));
1131
- message.append(" bytes. The user probably clicked Stop in the browser "
1132
- "or his Internet connection stalled.");
1133
- throw IOException(message);
1134
- }
1135
1126
  return tempFile;
1136
1127
  }
1137
1128
 
@@ -1162,17 +1153,6 @@ private:
1162
1153
  while ((len = readRequestBodyFromApache(r, buf, sizeof(buf))) > 0) {
1163
1154
  buffer.append(buf, len);
1164
1155
  }
1165
-
1166
- if (contentLength != NULL && buffer.size() != l_contentLength) {
1167
- string message = "It looks like the browser did not finish the file upload: "
1168
- "it said it will upload ";
1169
- message.append(contentLength);
1170
- message.append(" bytes, but it closed the connection after sending ");
1171
- message.append(toString(buffer.size()));
1172
- message.append(" bytes. The user probably clicked Stop in the browser "
1173
- "or his Internet connection stalled.");
1174
- throw IOException(message);
1175
- }
1176
1156
  }
1177
1157
 
1178
1158
  void sendRequestBody(request_rec *r, Application::SessionPtr &session, shared_ptr<BufferedUpload> &uploadData) {
@@ -1257,6 +1237,13 @@ public:
1257
1237
 
1258
1238
  ~Hooks() {
1259
1239
  removeDirTree(getPassengerTempDir().c_str());
1240
+ /* mod_passenger is loaded twice during Apache startup (load, unload, load),
1241
+ * but on OS X sometimes the old memory values of global variables can
1242
+ * stay behind and affect the next load. So here we empty the temp dir variable
1243
+ * explicitly so that the next load correctly calculates a new temp dir
1244
+ * filename using the after-daemonization Apache PID.
1245
+ */
1246
+ setPassengerTempDir("");
1260
1247
  }
1261
1248
 
1262
1249
  int prepareRequestWhenInHighPerformanceMode(request_rec *r) {
@@ -26,6 +26,6 @@
26
26
  #define _PASSENGER_VERSION_H_
27
27
 
28
28
  /* Don't forget to update lib/phusion_passenger/constants.rb too. */
29
- #define PASSENGER_VERSION "2.2.14"
29
+ #define PASSENGER_VERSION "2.2.15"
30
30
 
31
31
  #endif /* _PASSENGER_VERSION_H */
@@ -67,7 +67,8 @@ passenger_static_content_handler(ngx_http_request_t *r, ngx_str_t *filename)
67
67
  return NGX_DECLINED;
68
68
  }
69
69
 
70
- #if NGINX_VERSION_NUM < 8038
70
+ #if (PASSENGER_NGINX_MINOR_VERSION == 8 && PASSENGER_NGINX_MICRO_VERSION < 38) || \
71
+ (PASSENGER_NGINX_MINOR_VERSION == 7 && PASSENGER_NGINX_MICRO_VERSION < 66)
71
72
  if (r->zero_in_uri) {
72
73
  return NGX_DECLINED;
73
74
  }
@@ -24,7 +24,7 @@
24
24
  module PhusionPassenger
25
25
  # Phusion Passenger version number.
26
26
  # Don't forget to edit ext/common/Version.h too.
27
- VERSION_STRING = '2.2.14'
27
+ VERSION_STRING = '2.2.15'
28
28
 
29
29
  DEFAULT_FRAMEWORK_SPAWNER_MAX_IDLE_TIME = 30 * 60
30
30
  DEFAULT_APP_SPAWNER_MAX_IDLE_TIME = 10 * 60
@@ -79,15 +79,6 @@ class SpawnManager < AbstractServer
79
79
  require 'phusion_passenger/html_template'
80
80
  require 'phusion_passenger/platform_info'
81
81
  require 'phusion_passenger/exceptions'
82
-
83
- # Commonly used libraries.
84
- ['mysql', 'sqlite3'].each do |lib|
85
- begin
86
- require lib
87
- rescue LoadError
88
- # Do nothing; ignore if not present.
89
- end
90
- end
91
82
  end
92
83
  end
93
84
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: passenger
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 2
8
8
  - 2
9
- - 14
10
- version: 2.2.14
9
+ - 15
10
+ version: 2.2.15
11
11
  platform: ruby
12
12
  authors:
13
13
  - Phusion - http://www.phusion.nl/
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-06-04 00:00:00 +02:00
18
+ date: 2010-06-24 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency