Skip to content

Commit 745938a

Browse files
committed
Fix Nginx >= 0.8.38 support. Thanks Sergey A. Osokin
1 parent eb512a5 commit 745938a

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Release 2.2.12
2121
If Nginx is running as root and passenger_user_switching is turned
2222
off, then Phusion Passenger would fail to initialize because of
2323
a permission problem. This has been fixed. Issue #458.
24+
* [Nginx] Nginx >= 0.8.38 is now supported.
2425

2526

2627
Release 2.2.11

ext/nginx/StaticContentHandler.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
*/
2626

2727
#include "StaticContentHandler.h"
28+
#include "ngx_http_passenger_module.h"
2829

2930
static void
3031
set_request_extension(ngx_http_request_t *r, ngx_str_t *filename) {
@@ -66,9 +67,11 @@ passenger_static_content_handler(ngx_http_request_t *r, ngx_str_t *filename)
6667
return NGX_DECLINED;
6768
}
6869

69-
if (r->zero_in_uri) {
70-
return NGX_DECLINED;
71-
}
70+
#if NGINX_VERSION_NUM < 8038
71+
if (r->zero_in_uri) {
72+
return NGX_DECLINED;
73+
}
74+
#endif
7275

7376
log = r->connection->log;
7477

0 commit comments

Comments
 (0)