passenger 2.2.0 → 2.2.1

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 +0,0 @@
1
- - Passenger no longer resolves symlink anymore, so that it works properly
2
- with Capistrano deployments.
3
- - Chuncked transfer encoding support for uploads (Apache only).
data/Rakefile CHANGED
@@ -828,6 +828,7 @@ task :sloccount do
828
828
  "lib/rake/{cplusplus,extensions}.rb",
829
829
  "ext/apache2",
830
830
  "ext/nginx",
831
+ "ext/common",
831
832
  "ext/oxt",
832
833
  "ext/phusion_passenger/*.c",
833
834
  "test/**/*.{cpp,rb}",
@@ -389,7 +389,7 @@ private
389
389
  command = "./configure --prefix='#{prefix}' "
390
390
  if @pcre_source_dir
391
391
  command << "--with-pcre='#{@pcre_source_dir}' "
392
- else
392
+ elsif !pcre_is_installed?
393
393
  command << "--without-http_rewrite_module "
394
394
  end
395
395
  command << "--add-module='#{PASSENGER_ROOT}/ext/nginx' #{extra_configure_flags}"
@@ -70,7 +70,7 @@
70
70
  <a name="l00049"></a>00049 <span class="preprocessor">#endif </span><span class="comment">/* _PASSENGER_BUCKET_H_ */</span>
71
71
  <a name="l00050"></a>00050
72
72
  </pre></div></div>
73
- <hr size="1"><address style="text-align: right;"><small>Generated on Thu Apr 16 19:48:18 2009 for Passenger by&nbsp;
73
+ <hr size="1"><address style="text-align: right;"><small>Generated on Sat Apr 18 20:08:25 2009 for Passenger by&nbsp;
74
74
  <a href="http://www.doxygen.org/index.html">
75
75
  <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
76
76
  </body>
@@ -67,7 +67,7 @@
67
67
  <a name="l00046"></a>00046 <span class="comment"> */</span>
68
68
  <a name="l00047"></a>00047 <span class="comment"></span>
69
69
  <a name="l00048"></a>00048 <span class="comment">/** Module version number. */</span>
70
- <a name="l00049"></a><a class="code" href="group__Configuration.html#ga19398896775408d6ab7fd8ce2acd992">00049</a> <span class="preprocessor">#define PASSENGER_VERSION "2.2.0"</span>
70
+ <a name="l00049"></a><a class="code" href="group__Configuration.html#ga19398896775408d6ab7fd8ce2acd992">00049</a> <span class="preprocessor">#define PASSENGER_VERSION "2.2.1"</span>
71
71
  <a name="l00050"></a>00050 <span class="preprocessor"></span>
72
72
  <a name="l00051"></a>00051 <span class="preprocessor">#ifdef __cplusplus</span>
73
73
  <a name="l00052"></a>00052 <span class="preprocessor"></span><span class="preprocessor"> #include &lt;set&gt;</span>
@@ -376,7 +376,7 @@
376
376
  <a name="l00355"></a>00355
377
377
  <a name="l00356"></a>00356 <span class="preprocessor">#endif </span><span class="comment">/* _PASSENGER_CONFIGURATION_H_ */</span>
378
378
  </pre></div></div>
379
- <hr size="1"><address style="text-align: right;"><small>Generated on Thu Apr 16 19:48:18 2009 for Passenger by&nbsp;
379
+ <hr size="1"><address style="text-align: right;"><small>Generated on Sat Apr 18 20:08:25 2009 for Passenger by&nbsp;
380
380
  <a href="http://www.doxygen.org/index.html">
381
381
  <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
382
382
  </body>
@@ -316,7 +316,7 @@
316
316
  <a name="l00295"></a>00295 <span class="preprocessor">#endif </span><span class="comment">/* _PASSENGER_DIRECTORY_MAPPER_H_ */</span>
317
317
  <a name="l00296"></a>00296
318
318
  </pre></div></div>
319
- <hr size="1"><address style="text-align: right;"><small>Generated on Thu Apr 16 19:48:18 2009 for Passenger by&nbsp;
319
+ <hr size="1"><address style="text-align: right;"><small>Generated on Sat Apr 18 20:08:25 2009 for Passenger by&nbsp;
320
320
  <a href="http://www.doxygen.org/index.html">
321
321
  <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
322
322
  </body>
@@ -65,7 +65,7 @@
65
65
  <a name="l00044"></a>00044 <span class="preprocessor"></span>
66
66
  <a name="l00045"></a>00045 <span class="preprocessor">#endif </span><span class="comment">/* _PASSENGER_HOOKS_H_ */</span>
67
67
  </pre></div></div>
68
- <hr size="1"><address style="text-align: right;"><small>Generated on Thu Apr 16 19:48:18 2009 for Passenger by&nbsp;
68
+ <hr size="1"><address style="text-align: right;"><small>Generated on Sat Apr 18 20:08:25 2009 for Passenger by&nbsp;
69
69
  <a href="http://www.doxygen.org/index.html">
70
70
  <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
71
71
  </body>
@@ -27,7 +27,7 @@
27
27
  <tr><td class="indexkey"><a class="el" href="classHooks.html">Hooks</a></td><td class="indexvalue">Apache hook functions, wrapped in a class </td></tr>
28
28
  </table>
29
29
  </div>
30
- <hr size="1"><address style="text-align: right;"><small>Generated on Thu Apr 16 19:48:18 2009 for Passenger by&nbsp;
30
+ <hr size="1"><address style="text-align: right;"><small>Generated on Sat Apr 18 20:08:25 2009 for Passenger by&nbsp;
31
31
  <a href="http://www.doxygen.org/index.html">
32
32
  <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
33
33
  </body>
@@ -28,7 +28,7 @@
28
28
  <tr class="memlist"><td><a class="el" href="classHooks.html#d6cca64be8a9075b4b92efdb4d9020a5">startBlockingModAutoIndex</a>(request_rec *r)</td><td><a class="el" href="classHooks.html">Hooks</a></td><td><code> [inline]</code></td></tr>
29
29
  <tr class="memlist"><td><a class="el" href="classHooks.html#e3091c57c95b2f8269f566099802f0ec">startBlockingModDir</a>(request_rec *r)</td><td><a class="el" href="classHooks.html">Hooks</a></td><td><code> [inline]</code></td></tr>
30
30
  </table></div>
31
- <hr size="1"><address style="text-align: right;"><small>Generated on Thu Apr 16 19:48:18 2009 for Passenger by&nbsp;
31
+ <hr size="1"><address style="text-align: right;"><small>Generated on Sat Apr 18 20:08:25 2009 for Passenger by&nbsp;
32
32
  <a href="http://www.doxygen.org/index.html">
33
33
  <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
34
34
  </body>
@@ -148,7 +148,7 @@ So in <a class="el" href="classHooks.html#e3091c57c95b2f8269f566099802f0ec" titl
148
148
  <hr>The documentation for this class was generated from the following file:<ul>
149
149
  <li>Hooks.cpp</ul>
150
150
  </div>
151
- <hr size="1"><address style="text-align: right;"><small>Generated on Thu Apr 16 19:48:18 2009 for Passenger by&nbsp;
151
+ <hr size="1"><address style="text-align: right;"><small>Generated on Sat Apr 18 20:08:25 2009 for Passenger by&nbsp;
152
152
  <a href="http://www.doxygen.org/index.html">
153
153
  <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
154
154
  </body>
@@ -30,7 +30,7 @@
30
30
  <tr class="memlist"><td><a class="el" href="classPassenger_1_1DirectoryMapper.html#f5091e3cef3878e160e5d3b2181d82fb">getEnvironment</a>()</td><td><a class="el" href="classPassenger_1_1DirectoryMapper.html">Passenger::DirectoryMapper</a></td><td><code> [inline]</code></td></tr>
31
31
  <tr class="memlist"><td><a class="el" href="classPassenger_1_1DirectoryMapper.html#ef969f27622fb215990a870076648aa1">getPublicDirectory</a>()</td><td><a class="el" href="classPassenger_1_1DirectoryMapper.html">Passenger::DirectoryMapper</a></td><td><code> [inline]</code></td></tr>
32
32
  </table></div>
33
- <hr size="1"><address style="text-align: right;"><small>Generated on Thu Apr 16 19:48:18 2009 for Passenger by&nbsp;
33
+ <hr size="1"><address style="text-align: right;"><small>Generated on Sat Apr 18 20:08:25 2009 for Passenger by&nbsp;
34
34
  <a href="http://www.doxygen.org/index.html">
35
35
  <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
36
36
  </body>
@@ -251,7 +251,7 @@ Returns an empty string if the document root of the HTTP request cannot be deter
251
251
  <hr>The documentation for this class was generated from the following file:<ul>
252
252
  <li><a class="el" href="DirectoryMapper_8h-source.html">DirectoryMapper.h</a></ul>
253
253
  </div>
254
- <hr size="1"><address style="text-align: right;"><small>Generated on Thu Apr 16 19:48:18 2009 for Passenger by&nbsp;
254
+ <hr size="1"><address style="text-align: right;"><small>Generated on Sat Apr 18 20:08:25 2009 for Passenger by&nbsp;
255
255
  <a href="http://www.doxygen.org/index.html">
256
256
  <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
257
257
  </body>
@@ -28,7 +28,7 @@
28
28
  </td><td><a class="el" href="classPassenger_1_1DirectoryMapper.html">DirectoryMapper</a> (Passenger)&nbsp;&nbsp;&nbsp;</td><td><a name="letter_H"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&nbsp;&nbsp;H&nbsp;&nbsp;</div></td></tr></table>
29
29
  </td><td><a class="el" href="classHooks.html">Hooks</a>&nbsp;&nbsp;&nbsp;</td></tr></table><p><div class="qindex"><a class="qindex" href="#letter_D">D</a>&nbsp;|&nbsp;<a class="qindex" href="#letter_H">H</a></div><p>
30
30
  </div>
31
- <hr size="1"><address style="text-align: right;"><small>Generated on Thu Apr 16 19:48:18 2009 for Passenger by&nbsp;
31
+ <hr size="1"><address style="text-align: right;"><small>Generated on Sat Apr 18 20:08:25 2009 for Passenger by&nbsp;
32
32
  <a href="http://www.doxygen.org/index.html">
33
33
  <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
34
34
  </body>
@@ -25,7 +25,7 @@
25
25
  <a name="l00004"></a>00004 <span class="comment">@defgroup Support Apache-independent support classes and function</span>
26
26
  <a name="l00005"></a>00005 <span class="comment">*/</span>
27
27
  </pre></div></div>
28
- <hr size="1"><address style="text-align: right;"><small>Generated on Thu Apr 16 19:48:18 2009 for Passenger by&nbsp;
28
+ <hr size="1"><address style="text-align: right;"><small>Generated on Sat Apr 18 20:08:25 2009 for Passenger by&nbsp;
29
29
  <a href="http://www.doxygen.org/index.html">
30
30
  <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
31
31
  </body>
@@ -29,7 +29,7 @@
29
29
  <tr><td class="indexkey"><b>Hooks.h</b> <a href="Hooks_8h-source.html">[code]</a></td><td class="indexvalue"></td></tr>
30
30
  </table>
31
31
  </div>
32
- <hr size="1"><address style="text-align: right;"><small>Generated on Thu Apr 16 19:48:18 2009 for Passenger by&nbsp;
32
+ <hr size="1"><address style="text-align: right;"><small>Generated on Sat Apr 18 20:08:25 2009 for Passenger by&nbsp;
33
33
  <a href="http://www.doxygen.org/index.html">
34
34
  <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
35
35
  </body>
@@ -53,7 +53,7 @@ Here is a list of all documented class members with links to the class documenta
53
53
  : <a class="el" href="classHooks.html#e3091c57c95b2f8269f566099802f0ec">Hooks</a>
54
54
  </ul>
55
55
  </div>
56
- <hr size="1"><address style="text-align: right;"><small>Generated on Thu Apr 16 19:48:18 2009 for Passenger by&nbsp;
56
+ <hr size="1"><address style="text-align: right;"><small>Generated on Sat Apr 18 20:08:25 2009 for Passenger by&nbsp;
57
57
  <a href="http://www.doxygen.org/index.html">
58
58
  <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
59
59
  </body>
@@ -53,7 +53,7 @@
53
53
  : <a class="el" href="classHooks.html#e3091c57c95b2f8269f566099802f0ec">Hooks</a>
54
54
  </ul>
55
55
  </div>
56
- <hr size="1"><address style="text-align: right;"><small>Generated on Thu Apr 16 19:48:18 2009 for Passenger by&nbsp;
56
+ <hr size="1"><address style="text-align: right;"><small>Generated on Sat Apr 18 20:08:25 2009 for Passenger by&nbsp;
57
57
  <a href="http://www.doxygen.org/index.html">
58
58
  <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
59
59
  </body>
@@ -79,7 +79,7 @@ A purple dashed arrow is used if a class is contained or used by another class.
79
79
  A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance. </li>
80
80
  </ul>
81
81
  </div>
82
- <hr size="1"><address style="text-align: right;"><small>Generated on Thu Apr 16 19:48:18 2009 for Passenger by&nbsp;
82
+ <hr size="1"><address style="text-align: right;"><small>Generated on Sat Apr 18 20:08:25 2009 for Passenger by&nbsp;
83
83
  <a href="http://www.doxygen.org/index.html">
84
84
  <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
85
85
  </body>
@@ -31,7 +31,7 @@ Collaboration diagram for Apache module configuration:</div>
31
31
  <table border="0" cellpadding="0" cellspacing="0">
32
32
  <tr><td></td></tr>
33
33
  <tr><td colspan="2"><br><h2>Defines</h2></td></tr>
34
- <tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Configuration.html#ga19398896775408d6ab7fd8ce2acd992">PASSENGER_VERSION</a>&nbsp;&nbsp;&nbsp;&quot;2.2.0&quot;</td></tr>
34
+ <tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Configuration.html#ga19398896775408d6ab7fd8ce2acd992">PASSENGER_VERSION</a>&nbsp;&nbsp;&nbsp;&quot;2.2.1&quot;</td></tr>
35
35
 
36
36
  <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Module version number. <a href="#ga19398896775408d6ab7fd8ce2acd992"></a><br></td></tr>
37
37
  <tr><td colspan="2"><br><h2>Functions</h2></td></tr>
@@ -58,7 +58,7 @@ Collaboration diagram for Apache module configuration:</div>
58
58
  <div class="memproto">
59
59
  <table class="memname">
60
60
  <tr>
61
- <td class="memname">#define PASSENGER_VERSION&nbsp;&nbsp;&nbsp;&quot;2.2.0&quot; </td>
61
+ <td class="memname">#define PASSENGER_VERSION&nbsp;&nbsp;&nbsp;&quot;2.2.1&quot; </td>
62
62
  </tr>
63
63
  </table>
64
64
  </div>
@@ -226,7 +226,7 @@ Apache module commands array.
226
226
  </div>
227
227
  </div><p>
228
228
  </div>
229
- <hr size="1"><address style="text-align: right;"><small>Generated on Thu Apr 16 19:48:18 2009 for Passenger by&nbsp;
229
+ <hr size="1"><address style="text-align: right;"><small>Generated on Sat Apr 18 20:08:25 2009 for Passenger by&nbsp;
230
230
  <a href="http://www.doxygen.org/index.html">
231
231
  <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
232
232
  </body>
@@ -41,7 +41,7 @@ Collaboration diagram for Core Apache-related classes and functions:</div>
41
41
 
42
42
  </table>
43
43
  </div>
44
- <hr size="1"><address style="text-align: right;"><small>Generated on Thu Apr 16 19:48:18 2009 for Passenger by&nbsp;
44
+ <hr size="1"><address style="text-align: right;"><small>Generated on Sat Apr 18 20:08:25 2009 for Passenger by&nbsp;
45
45
  <a href="http://www.doxygen.org/index.html">
46
46
  <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
47
47
  </body>
@@ -32,7 +32,7 @@ Collaboration diagram for Apache hooks:</div>
32
32
  <tr><td></td></tr>
33
33
  </table>
34
34
  </div>
35
- <hr size="1"><address style="text-align: right;"><small>Generated on Thu Apr 16 19:48:18 2009 for Passenger by&nbsp;
35
+ <hr size="1"><address style="text-align: right;"><small>Generated on Sat Apr 18 20:08:25 2009 for Passenger by&nbsp;
36
36
  <a href="http://www.doxygen.org/index.html">
37
37
  <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
38
38
  </body>
@@ -20,7 +20,7 @@
20
20
  <tr><td></td></tr>
21
21
  </table>
22
22
  </div>
23
- <hr size="1"><address style="text-align: right;"><small>Generated on Thu Apr 16 19:48:18 2009 for Passenger by&nbsp;
23
+ <hr size="1"><address style="text-align: right;"><small>Generated on Sat Apr 18 20:08:25 2009 for Passenger by&nbsp;
24
24
  <a href="http://www.doxygen.org/index.html">
25
25
  <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
26
26
  </body>
@@ -19,7 +19,7 @@
19
19
  <h1>Passenger Documentation</h1>
20
20
  <p>
21
21
  </div>
22
- <hr size="1"><address style="text-align: right;"><small>Generated on Thu Apr 16 19:48:18 2009 for Passenger by&nbsp;
22
+ <hr size="1"><address style="text-align: right;"><small>Generated on Sat Apr 18 20:08:25 2009 for Passenger by&nbsp;
23
23
  <a href="http://www.doxygen.org/index.html">
24
24
  <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
25
25
  </body>
@@ -25,7 +25,7 @@
25
25
  <li><a class="el" href="group__Support.html">Apache-independent support classes and function</a>
26
26
  </ul>
27
27
  </div>
28
- <hr size="1"><address style="text-align: right;"><small>Generated on Thu Apr 16 19:48:18 2009 for Passenger by&nbsp;
28
+ <hr size="1"><address style="text-align: right;"><small>Generated on Sat Apr 18 20:08:25 2009 for Passenger by&nbsp;
29
29
  <a href="http://www.doxygen.org/index.html">
30
30
  <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
31
31
  </body>
@@ -134,7 +134,7 @@ Class <a href="PhusionPassenger/VersionNotFound.html" class="link">PhusionPassen
134
134
  <tr valign='top'>
135
135
  <td class="attr-name">VERSION_STRING</td>
136
136
  <td>=</td>
137
- <td class="attr-value">'2.2.0'</td>
137
+ <td class="attr-value">'2.2.1'</td>
138
138
  </tr>
139
139
  <tr valign='top'>
140
140
  <td>&nbsp;</td>
@@ -1 +1 @@
1
- Thu, 16 Apr 2009 19:48:09 +0200
1
+ Sat, 18 Apr 2009 20:08:16 +0200
@@ -63,7 +63,7 @@
63
63
  </tr>
64
64
  <tr>
65
65
  <td>Modified:</td>
66
- <td>Thu Apr 16 19:42:11 +0200 2009</td>
66
+ <td>Sat Apr 18 20:06:06 +0200 2009</td>
67
67
  </tr>
68
68
  </table>
69
69
  </td></tr>
@@ -46,7 +46,7 @@
46
46
  */
47
47
 
48
48
  /** Module version number. */
49
- #define PASSENGER_VERSION "2.2.0"
49
+ #define PASSENGER_VERSION "2.2.1"
50
50
 
51
51
  #ifdef __cplusplus
52
52
  #include <set>
@@ -47,6 +47,12 @@ static ngx_str_t headers_to_hide[] = {
47
47
 
48
48
  passenger_main_conf_t passenger_main_conf;
49
49
 
50
+ #if NGINX_VERSION_NUM >= 7000
51
+ static ngx_path_init_t ngx_http_proxy_temp_path = {
52
+ ngx_string(NGX_HTTP_PROXY_TEMP_PATH), { 1, 2, 0 }
53
+ };
54
+ #endif
55
+
50
56
 
51
57
  void *
52
58
  passenger_create_main_conf(ngx_conf_t *cf)
@@ -222,7 +228,9 @@ passenger_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
222
228
  ngx_hash_init_t hash;
223
229
  ngx_http_script_compile_t sc;
224
230
  ngx_http_script_copy_code_t *copy;
225
- u_char *temp_path;
231
+ #if NGINX_VERSION_NUM < 7000
232
+ u_char *temp_path;
233
+ #endif
226
234
 
227
235
  ngx_conf_merge_value(conf->enabled, prev->enabled, 0);
228
236
  ngx_conf_merge_value(conf->use_global_queue, prev->use_global_queue, 0);
@@ -393,14 +401,21 @@ passenger_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
393
401
  |NGX_HTTP_UPSTREAM_FT_OFF;
394
402
  }
395
403
 
396
- temp_path = ngx_palloc(cf->pool, NGX_MAX_PATH);
397
- ngx_memzero(temp_path, NGX_MAX_PATH);
398
- ngx_snprintf(temp_path, NGX_MAX_PATH, "%s/webserver_private", passenger_temp_dir);
399
- ngx_conf_merge_path_value(conf->upstream.temp_path,
400
- prev->upstream.temp_path,
401
- temp_path, 1, 2, 0,
402
- ngx_garbage_collector_temp_handler, cf);
403
- conf->upstream.temp_path->name.len = ngx_strlen(conf->upstream.temp_path->name.data);
404
+ #if NGINX_VERSION_NUM < 7000
405
+ temp_path = ngx_palloc(cf->pool, NGX_MAX_PATH);
406
+ ngx_memzero(temp_path, NGX_MAX_PATH);
407
+ ngx_snprintf(temp_path, NGX_MAX_PATH, "%s/webserver_private", passenger_temp_dir);
408
+ ngx_conf_merge_path_value(conf->upstream.temp_path,
409
+ prev->upstream.temp_path,
410
+ temp_path, 1, 2, 0,
411
+ ngx_garbage_collector_temp_handler, cf);
412
+ conf->upstream.temp_path->name.len = ngx_strlen(conf->upstream.temp_path->name.data);
413
+ #else
414
+ ngx_conf_merge_path_value(cf,
415
+ &conf->upstream.temp_path,
416
+ prev->upstream.temp_path,
417
+ &ngx_http_proxy_temp_path);
418
+ #endif
404
419
 
405
420
  ngx_conf_merge_value(conf->upstream.pass_request_headers,
406
421
  prev->upstream.pass_request_headers, 1);
@@ -293,7 +293,13 @@ start_helper_server(ngx_cycle_t *cycle)
293
293
  } while (i < HELPER_SERVER_PASSWORD_SIZE);
294
294
 
295
295
  /* Wait until the HelperServer has done initializing. */
296
- read(feedback_pipe[0], &buf, 1);
296
+ do {
297
+ /* We must do something with read()'s return value
298
+ * because otherwise on some platform it might raise a
299
+ * compile warning.
300
+ */
301
+ ret = read(feedback_pipe[0], &buf, 1);
302
+ } while (ret == -1 && errno == EINTR);
297
303
  close(feedback_pipe[0]);
298
304
 
299
305
  /* Create the file passenger_temp_dir + "/control_process.pid"
@@ -305,8 +311,16 @@ start_helper_server(ngx_cycle_t *cycle)
305
311
  *last = (u_char) '\0';
306
312
  f = fopen((const char *) filename, "w");
307
313
  if (f != NULL) {
308
- fchmod(fileno(f), S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
309
- fchown(fileno(f), ccf->user, ccf->group);
314
+ /* We must do something with these return values because
315
+ * otherwise on some platforms it will cause a compiler
316
+ * warning.
317
+ */
318
+ do {
319
+ ret = fchmod(fileno(f), S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
320
+ } while (ret == -1 && errno == EINTR);
321
+ do {
322
+ ret = fchown(fileno(f), ccf->user, ccf->group);
323
+ } while (ret == -1 && errno == EINTR);
310
324
  fclose(f);
311
325
  } else {
312
326
  ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno,
@@ -358,13 +372,15 @@ static void
358
372
  shutdown_helper_server(ngx_cycle_t *cycle)
359
373
  {
360
374
  time_t begin_time;
361
- int helper_server_exited;
375
+ int helper_server_exited, ret;
362
376
  u_char command[NGX_MAX_PATH + 10];
363
377
 
364
378
  /* We write one byte to the admin pipe, doesn't matter what the byte is.
365
379
  * The helper server will detect this as an exit command.
366
380
  */
367
- write(helper_server_admin_pipe, "x", 1);
381
+ do {
382
+ ret = write(helper_server_admin_pipe, "x", 1);
383
+ } while ((ret == -1 && errno == EINTR) || ret == 0);
368
384
  close(helper_server_admin_pipe);
369
385
 
370
386
  /* Wait at most HELPER_SERVER_MAX_SHUTDOWN_TIME seconds for the helper
@@ -403,7 +419,9 @@ shutdown_helper_server(ngx_cycle_t *cycle)
403
419
  ngx_memzero(command, sizeof(command));
404
420
  if (ngx_snprintf(command, sizeof(command), "chmod -R u=rwx \"%s\"",
405
421
  passenger_temp_dir) != NULL) {
406
- system((const char *) command);
422
+ do {
423
+ ret = system((const char *) command);
424
+ } while (ret == -1 && errno == EINTR);
407
425
  }
408
426
 
409
427
  ngx_memzero(command, sizeof(command));
@@ -524,7 +542,9 @@ pre_config_init(ngx_conf_t *cf)
524
542
  */
525
543
  ngx_memzero(command, sizeof(command));
526
544
  ngx_snprintf(command, sizeof(command), "mkdir -p \"%s\"", passenger_temp_dir);
527
- system((const char *) command);
545
+ do {
546
+ ret = system((const char *) command);
547
+ } while (ret == -1 && errno == EINTR);
528
548
 
529
549
  /* Build helper server socket filename string. */
530
550
 
@@ -41,17 +41,13 @@ static initialize_backtrace_support_for_this_thread main_thread_initialization("
41
41
  /*
42
42
  * boost::thread_specific_storage is pretty expensive. So we use the __thread
43
43
  * keyword whenever possible - that's almost free.
44
- * GCC supports the __thread keyword on x86 since version 3.3. Not sure
45
- * about other architectures.
44
+ * GCC supports the __thread keyword on x86 since version 3.3, but versions earlier
45
+ * than 4.1.2 have bugs (http://gcc.gnu.org/ml/gcc-bugs/2006-09/msg02275.html).
46
46
  */
47
47
 
48
- #if defined(__GNUC__) && ( \
49
- __GNUC__ > 3 || ( \
50
- __GNUC__ == 3 && __GNUC_MINOR__ >= 3 \
51
- ) \
52
- )
53
- #define GCC_IS_3_3_OR_HIGHER
54
- #endif
48
+ #define GCC_VERSION (__GNUC__ * 10000 \
49
+ + __GNUC_MINOR__ * 100 \
50
+ + __GNUC_PATCHLEVEL__)
55
51
 
56
52
  /*
57
53
  * FreeBSD 5 supports the __thread keyword, and everything works fine in
@@ -66,7 +62,7 @@ static initialize_backtrace_support_for_this_thread main_thread_initialization("
66
62
  *
67
63
  * MacOS X doesn't support __thread at all.
68
64
  */
69
- #if defined(GCC_IS_3_3_OR_HIGHER) && !defined(__FreeBSD__) && \
65
+ #if GCC_VERSION >= 40102 && !defined(__FreeBSD__) && \
70
66
  !defined(__SOLARIS__) && !defined(__OpenBSD__) && !defined(__APPLE__)
71
67
  static __thread spin_lock *backtrace_lock = NULL;
72
68
  static __thread vector<trace_point *> *current_backtrace = NULL;
@@ -24,7 +24,7 @@
24
24
  module PhusionPassenger
25
25
  # Phusion Passenger version number.
26
26
  # Don't forget to edit Configuration.h too.
27
- VERSION_STRING = '2.2.0'
27
+ VERSION_STRING = '2.2.1'
28
28
 
29
29
  DEFAULT_FRAMEWORK_SPAWNER_MAX_IDLE_TIME = 30 * 60
30
30
  DEFAULT_APP_SPAWNER_MAX_IDLE_TIME = 10 * 60
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: passenger
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Phusion - http://www.phusion.nl/
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-04-16 00:00:00 +02:00
12
+ date: 2009-04-18 00:00:00 +02:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency