passenger 5.0.28 → 5.0.29
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 +4 -4
- data/.editorconfig +5 -0
- data/CHANGELOG +13 -0
- data/build/apache2.rb +3 -3
- data/build/common_library.rb +3 -3
- data/build/nginx.rb +4 -4
- data/build/packaging.rb +9 -8
- data/build/support/cxx_dependency_map.rb +9 -7
- data/build/support/general.rb +39 -0
- data/build/support/vendor/cxxcodebuilder/CxxCodeBuilder.sublime-project +8 -0
- data/build/support/vendor/cxxcodebuilder/Gemfile +4 -0
- data/build/support/vendor/cxxcodebuilder/Gemfile.lock +28 -0
- data/build/support/vendor/cxxcodebuilder/LICENSE.md +19 -0
- data/build/support/vendor/cxxcodebuilder/README.md +98 -0
- data/build/support/vendor/cxxcodebuilder/Rakefile +4 -0
- data/build/support/vendor/cxxcodebuilder/lib/cxxcodebuilder.rb +23 -0
- data/build/support/vendor/cxxcodebuilder/lib/cxxcodebuilder/builder.rb +574 -0
- data/build/support/vendor/cxxcodebuilder/lib/cxxcodebuilder/initializer_builder.rb +166 -0
- data/build/test_basics.rb +2 -1
- data/resources/templates/standalone/server.erb +6 -4
- data/src/agent/Core/Controller/ForwardResponse.cpp +5 -5
- data/src/agent/Watchdog/WatchdogMain.cpp +0 -10
- data/src/apache2_module/ConfigurationCommands.cpp +181 -248
- data/src/apache2_module/ConfigurationCommands.cpp.cxxcodebuilder +127 -0
- data/src/apache2_module/ConfigurationFields.hpp +135 -51
- data/src/apache2_module/ConfigurationFields.hpp.cxxcodebuilder +113 -0
- data/src/apache2_module/ConfigurationSetters.cpp +414 -459
- data/src/apache2_module/ConfigurationSetters.cpp.cxxcodebuilder +144 -0
- data/src/apache2_module/CreateDirConfig.cpp +49 -52
- data/src/apache2_module/CreateDirConfig.cpp.cxxcodebuilder +81 -0
- data/src/apache2_module/Hooks.cpp +0 -14
- data/src/apache2_module/MergeDirConfig.cpp +136 -226
- data/src/apache2_module/MergeDirConfig.cpp.cxxcodebuilder +97 -0
- data/src/apache2_module/SetHeaders.cpp +92 -143
- data/src/apache2_module/SetHeaders.cpp.cxxcodebuilder +106 -0
- data/src/cxx_supportlib/Constants.h +86 -146
- data/src/cxx_supportlib/Constants.h.cxxcodebuilder +43 -0
- data/src/cxx_supportlib/DataStructures/LString.h +40 -23
- data/src/cxx_supportlib/MemoryKit/mbuf.cpp +60 -25
- data/src/cxx_supportlib/MemoryKit/mbuf.h +50 -25
- data/src/cxx_supportlib/ServerKit/CookieUtils.h +36 -3
- data/src/cxx_supportlib/ServerKit/HeaderTable.h +2 -8
- data/src/cxx_supportlib/ServerKit/HttpServer.h +6 -15
- data/src/cxx_supportlib/WatchdogLauncher.cpp +4 -4
- data/src/cxx_supportlib/WatchdogLauncher.h +2 -3
- data/src/nginx_module/CacheLocationConfig.c +623 -780
- data/src/nginx_module/CacheLocationConfig.c.cxxcodebuilder +214 -0
- data/src/nginx_module/Configuration.h +1 -1
- data/src/nginx_module/ConfigurationCommands.c +404 -535
- data/src/nginx_module/ConfigurationCommands.c.cxxcodebuilder +157 -0
- data/src/nginx_module/CreateLocationConfig.c +82 -206
- data/src/nginx_module/CreateLocationConfig.c.cxxcodebuilder +98 -0
- data/src/nginx_module/LocationConfig.h +97 -0
- data/src/nginx_module/LocationConfig.h.cxxcodebuilder +131 -0
- data/src/nginx_module/MergeLocationConfig.c +157 -278
- data/src/nginx_module/MergeLocationConfig.c.cxxcodebuilder +144 -0
- data/src/nginx_module/ngx_http_passenger_module.c +4 -10
- data/src/ruby_supportlib/phusion_passenger.rb +4 -4
- data/src/ruby_supportlib/phusion_passenger/config/validate_install_command.rb +2 -2
- data/src/ruby_supportlib/phusion_passenger/packaging.rb +2 -0
- data/src/ruby_supportlib/phusion_passenger/platform_info/compiler.rb +6 -0
- data/src/ruby_supportlib/phusion_passenger/platform_info/cxx_portability.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/standalone/start_command.rb +27 -8
- data/src/ruby_supportlib/phusion_passenger/vendor/daemon_controller.rb +120 -2
- data/src/ruby_supportlib/phusion_passenger/vendor/daemon_controller/lock_file.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/vendor/daemon_controller/spawn.rb +4 -4
- data/src/ruby_supportlib/phusion_passenger/vendor/daemon_controller/version.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/api.rb +5 -5
- metadata +24 -15
- data/src/apache2_module/ConfigurationCommands.cpp.erb +0 -109
- data/src/apache2_module/ConfigurationFields.hpp.erb +0 -98
- data/src/apache2_module/ConfigurationSetters.cpp.erb +0 -128
- data/src/apache2_module/CreateDirConfig.cpp.erb +0 -72
- data/src/apache2_module/MergeDirConfig.cpp.erb +0 -82
- data/src/apache2_module/SetHeaders.cpp.erb +0 -91
- data/src/cxx_supportlib/Constants.h.erb +0 -41
- data/src/nginx_module/CacheLocationConfig.c.erb +0 -171
- data/src/nginx_module/ConfigurationCommands.c.erb +0 -144
- data/src/nginx_module/ConfigurationFields.h +0 -145
- data/src/nginx_module/ConfigurationFields.h.erb +0 -112
- data/src/nginx_module/CreateLocationConfig.c.erb +0 -78
- data/src/nginx_module/MergeLocationConfig.c.erb +0 -118
@@ -1,118 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* Phusion Passenger - https://www.phusionpassenger.com/
|
3
|
-
* Copyright (c) 2010-2015 Phusion Holding B.V.
|
4
|
-
*
|
5
|
-
* "Passenger", "Phusion Passenger" and "Union Station" are registered
|
6
|
-
* trademarks of Phusion Holding B.V.
|
7
|
-
*
|
8
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
9
|
-
* of this software and associated documentation files (the "Software"), to deal
|
10
|
-
* in the Software without restriction, including without limitation the rights
|
11
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
12
|
-
* copies of the Software, and to permit persons to whom the Software is
|
13
|
-
* furnished to do so, subject to the following conditions:
|
14
|
-
*
|
15
|
-
* The above copyright notice and this permission notice shall be included in
|
16
|
-
* all copies or substantial portions of the Software.
|
17
|
-
*
|
18
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
19
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
20
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
21
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
22
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
23
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
24
|
-
* THE SOFTWARE.
|
25
|
-
*/
|
26
|
-
|
27
|
-
/*
|
28
|
-
* MergeLocationConfig.c is automatically generated from MergeLocationConfig.c.erb,
|
29
|
-
* using definitions from src/ruby_supportlib/phusion_passenger/nginx/config_options.rb.
|
30
|
-
* Edits to MergeLocationConfig.c will be lost.
|
31
|
-
*
|
32
|
-
* To update MergeLocationConfig.c:
|
33
|
-
* rake nginx
|
34
|
-
*
|
35
|
-
* To force regeneration of MergeLocationConfig.c:
|
36
|
-
* rm -f src/nginx_module/MergeLocationConfig.c
|
37
|
-
* rake src/nginx_module/MergeLocationConfig.c
|
38
|
-
*/
|
39
|
-
|
40
|
-
/* 0: NGX_CONF_ERROR, 1: OK */
|
41
|
-
int generated_merge_part(passenger_loc_conf_t *conf, passenger_loc_conf_t *prev, ngx_conf_t *cf) {
|
42
|
-
<%
|
43
|
-
require 'phusion_passenger/nginx/config_options'
|
44
|
-
|
45
|
-
def filter_eligible_options(options)
|
46
|
-
return options.reject do |option|
|
47
|
-
option[:alias_for] ||
|
48
|
-
option.fetch(:field, true).nil? ||
|
49
|
-
option[:field].to_s =~ /\./ ||
|
50
|
-
!option.fetch(:auto_generate_nginx_merge_code, true)
|
51
|
-
end
|
52
|
-
end
|
53
|
-
|
54
|
-
def struct_field_for(option)
|
55
|
-
if option.has_key?(:field)
|
56
|
-
return option[:field]
|
57
|
-
else
|
58
|
-
return option[:name].sub(/^passenger_/, '')
|
59
|
-
end
|
60
|
-
end
|
61
|
-
|
62
|
-
def default_value_for(option)
|
63
|
-
case option[:type]
|
64
|
-
when :string
|
65
|
-
if option[:default]
|
66
|
-
return option[:default].inspect
|
67
|
-
else
|
68
|
-
return "NULL"
|
69
|
-
end
|
70
|
-
when :integer, :flag
|
71
|
-
if option[:default]
|
72
|
-
return option[:default]
|
73
|
-
else
|
74
|
-
return "NGX_CONF_UNSET"
|
75
|
-
end
|
76
|
-
when :uinteger
|
77
|
-
if option[:default]
|
78
|
-
return option[:default]
|
79
|
-
else
|
80
|
-
return "NGX_CONF_UNSET_UINT"
|
81
|
-
end
|
82
|
-
else
|
83
|
-
raise "Unknown type #{option[:type].inspect} for option #{option[:name]}"
|
84
|
-
end
|
85
|
-
end
|
86
|
-
%>
|
87
|
-
|
88
|
-
<% for option in filter_eligible_options(LOCATION_CONFIGURATION_OPTIONS) %>
|
89
|
-
<% if option[:type] == :string %>
|
90
|
-
ngx_conf_merge_str_value(conf-><%= struct_field_for(option) %>,
|
91
|
-
prev-><%= struct_field_for(option) %>,
|
92
|
-
NULL);
|
93
|
-
<% elsif option[:type] == :integer || option[:type] == :flag %>
|
94
|
-
ngx_conf_merge_value(conf-><%= struct_field_for(option) %>,
|
95
|
-
prev-><%= struct_field_for(option) %>,
|
96
|
-
NGX_CONF_UNSET);
|
97
|
-
<% elsif option[:type] == :uinteger %>
|
98
|
-
ngx_conf_merge_uint_value(conf-><%= struct_field_for(option) %>,
|
99
|
-
prev-><%= struct_field_for(option) %>,
|
100
|
-
<%= default_value_for(option) || "NGX_CONF_UNSET_UINT" %>);
|
101
|
-
<% elsif option[:type] == :string_array %>
|
102
|
-
if (merge_string_array(cf, &prev-><%= struct_field_for(option) %>, &conf-><%= struct_field_for(option) %>) != NGX_OK) {
|
103
|
-
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
|
104
|
-
"cannot merge \"<%= option[:name] %>\" configurations");
|
105
|
-
return 0;
|
106
|
-
}
|
107
|
-
<% elsif option[:type] == :string_keyval %>
|
108
|
-
if (merge_string_keyval_table(cf, &prev-><%= struct_field_for(option) %>, &conf-><%= struct_field_for(option) %>) != NGX_OK) {
|
109
|
-
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
|
110
|
-
"cannot merge \"<%= option[:name] %>\" configurations");
|
111
|
-
return 0;
|
112
|
-
}
|
113
|
-
<% else %>
|
114
|
-
<% raise "Unknown option type #{option[:type].inspect} for option #{option[:name]}" %>
|
115
|
-
<% end %>
|
116
|
-
<% end %>
|
117
|
-
return 1;
|
118
|
-
}
|