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,31 +1,31 @@
|
|
1
1
|
/*
|
2
|
-
*
|
3
|
-
*
|
2
|
+
* Phusion Passenger - https://www.phusionpassenger.com/
|
3
|
+
* Copyright (c) 2010-2016 Phusion Holding B.V.
|
4
4
|
*
|
5
|
-
*
|
6
|
-
*
|
5
|
+
* "Passenger", "Phusion Passenger" and "Union Station" are registered
|
6
|
+
* trademarks of Phusion Holding B.V.
|
7
7
|
*
|
8
|
-
*
|
9
|
-
*
|
10
|
-
*
|
11
|
-
*
|
12
|
-
*
|
13
|
-
*
|
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
14
|
*
|
15
|
-
*
|
16
|
-
*
|
15
|
+
* The above copyright notice and this permission notice shall be included in
|
16
|
+
* all copies or substantial portions of the Software.
|
17
17
|
*
|
18
|
-
*
|
19
|
-
*
|
20
|
-
*
|
21
|
-
*
|
22
|
-
*
|
23
|
-
*
|
24
|
-
*
|
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
25
|
*/
|
26
26
|
|
27
27
|
/*
|
28
|
-
* ConfigurationSetters.cpp is automatically generated from ConfigurationSetters.cpp.
|
28
|
+
* ConfigurationSetters.cpp is automatically generated from ConfigurationSetters.cpp.cxxcodebuilder,
|
29
29
|
* using definitions from src/ruby_supportlib/phusion_passenger/apache2/config_options.rb.
|
30
30
|
* Edits to ConfigurationSetters.cpp will be lost.
|
31
31
|
*
|
@@ -37,445 +37,400 @@
|
|
37
37
|
* rake src/apache2_module/ConfigurationSetters.cpp
|
38
38
|
*/
|
39
39
|
|
40
|
+
static const char *
|
41
|
+
cmd_passenger_ruby(cmd_parms *cmd, void *pcfg, const char *arg) {
|
42
|
+
DirConfig *config = (DirConfig *) pcfg;
|
43
|
+
config->ruby = arg;
|
44
|
+
return NULL;
|
45
|
+
}
|
40
46
|
|
47
|
+
static const char *
|
48
|
+
cmd_passenger_python(cmd_parms *cmd, void *pcfg, const char *arg) {
|
49
|
+
DirConfig *config = (DirConfig *) pcfg;
|
50
|
+
config->python = arg;
|
51
|
+
return NULL;
|
52
|
+
}
|
41
53
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
static const char *
|
425
|
-
cmd_passenger_force_max_concurrent_requests_per_process(cmd_parms *cmd, void *pcfg, const char *arg) {
|
426
|
-
DirConfig *config = (DirConfig *) pcfg;
|
427
|
-
char *end;
|
428
|
-
long result;
|
429
|
-
|
430
|
-
result = strtol(arg, &end, 10);
|
431
|
-
if (*end != '\0') {
|
432
|
-
string message = "Invalid number specified for ";
|
433
|
-
message.append(cmd->directive->directive);
|
434
|
-
message.append(".");
|
435
|
-
|
436
|
-
char *messageStr = (char *) apr_palloc(cmd->temp_pool,
|
437
|
-
message.size() + 1);
|
438
|
-
memcpy(messageStr, message.c_str(), message.size() + 1);
|
439
|
-
return messageStr;
|
440
|
-
|
441
|
-
} else {
|
442
|
-
config->forceMaxConcurrentRequestsPerProcess = (int) result;
|
443
|
-
return NULL;
|
444
|
-
}
|
445
|
-
}
|
446
|
-
|
447
|
-
|
448
|
-
static const char *
|
449
|
-
cmd_passenger_lve_min_uid(cmd_parms *cmd, void *pcfg, const char *arg) {
|
450
|
-
DirConfig *config = (DirConfig *) pcfg;
|
451
|
-
char *end;
|
452
|
-
long result;
|
453
|
-
|
454
|
-
result = strtol(arg, &end, 10);
|
455
|
-
if (*end != '\0') {
|
456
|
-
string message = "Invalid number specified for ";
|
457
|
-
message.append(cmd->directive->directive);
|
458
|
-
message.append(".");
|
459
|
-
|
460
|
-
char *messageStr = (char *) apr_palloc(cmd->temp_pool,
|
461
|
-
message.size() + 1);
|
462
|
-
memcpy(messageStr, message.c_str(), message.size() + 1);
|
463
|
-
return messageStr;
|
464
|
-
|
465
|
-
} else if (result < 0) {
|
466
|
-
string message = "Value for ";
|
467
|
-
message.append(cmd->directive->directive);
|
468
|
-
message.append(" must be greater than or equal to 0.");
|
469
|
-
|
470
|
-
char *messageStr = (char *) apr_palloc(cmd->temp_pool,
|
471
|
-
message.size() + 1);
|
472
|
-
memcpy(messageStr, message.c_str(), message.size() + 1);
|
473
|
-
return messageStr;
|
474
|
-
|
475
|
-
} else {
|
476
|
-
config->lveMinUid = (int) result;
|
477
|
-
return NULL;
|
478
|
-
}
|
479
|
-
}
|
480
|
-
|
54
|
+
static const char *
|
55
|
+
cmd_passenger_nodejs(cmd_parms *cmd, void *pcfg, const char *arg) {
|
56
|
+
DirConfig *config = (DirConfig *) pcfg;
|
57
|
+
config->nodejs = arg;
|
58
|
+
return NULL;
|
59
|
+
}
|
60
|
+
|
61
|
+
static const char *
|
62
|
+
cmd_passenger_meteor_app_settings(cmd_parms *cmd, void *pcfg, const char *arg) {
|
63
|
+
DirConfig *config = (DirConfig *) pcfg;
|
64
|
+
config->meteorAppSettings = arg;
|
65
|
+
return NULL;
|
66
|
+
}
|
67
|
+
|
68
|
+
static const char *
|
69
|
+
cmd_passenger_app_env(cmd_parms *cmd, void *pcfg, const char *arg) {
|
70
|
+
DirConfig *config = (DirConfig *) pcfg;
|
71
|
+
config->appEnv = arg;
|
72
|
+
return NULL;
|
73
|
+
}
|
74
|
+
|
75
|
+
static const char *
|
76
|
+
cmd_passenger_min_instances(cmd_parms *cmd, void *pcfg, const char *arg) {
|
77
|
+
DirConfig *config = (DirConfig *) pcfg;
|
78
|
+
char *end;
|
79
|
+
long result;
|
80
|
+
|
81
|
+
result = strtol(arg, &end, 10);
|
82
|
+
if (*end != '\0') {
|
83
|
+
string message = "Invalid number specified for ";
|
84
|
+
message.append(cmd->directive->directive);
|
85
|
+
message.append(".");
|
86
|
+
|
87
|
+
char *messageStr = (char *) apr_palloc(cmd->temp_pool,
|
88
|
+
message.size() + 1);
|
89
|
+
memcpy(messageStr, message.c_str(), message.size() + 1);
|
90
|
+
return messageStr;
|
91
|
+
} else if (result < 0) {
|
92
|
+
string message = "Value for ";
|
93
|
+
message.append(cmd->directive->directive);
|
94
|
+
message.append(" must be greater than or equal to 0.");
|
95
|
+
|
96
|
+
char *messageStr = (char *) apr_palloc(cmd->temp_pool,
|
97
|
+
message.size() + 1);
|
98
|
+
memcpy(messageStr, message.c_str(), message.size() + 1);
|
99
|
+
return messageStr;
|
100
|
+
} else {
|
101
|
+
config->minInstances = (int) result;
|
102
|
+
return NULL;
|
103
|
+
}
|
104
|
+
}
|
105
|
+
|
106
|
+
static const char *
|
107
|
+
cmd_passenger_max_instances_per_app(cmd_parms *cmd, void *pcfg, const char *arg) {
|
108
|
+
DirConfig *config = (DirConfig *) pcfg;
|
109
|
+
char *end;
|
110
|
+
long result;
|
111
|
+
|
112
|
+
result = strtol(arg, &end, 10);
|
113
|
+
if (*end != '\0') {
|
114
|
+
string message = "Invalid number specified for ";
|
115
|
+
message.append(cmd->directive->directive);
|
116
|
+
message.append(".");
|
117
|
+
|
118
|
+
char *messageStr = (char *) apr_palloc(cmd->temp_pool,
|
119
|
+
message.size() + 1);
|
120
|
+
memcpy(messageStr, message.c_str(), message.size() + 1);
|
121
|
+
return messageStr;
|
122
|
+
} else {
|
123
|
+
config->maxInstancesPerApp = (int) result;
|
124
|
+
return NULL;
|
125
|
+
}
|
126
|
+
}
|
127
|
+
|
128
|
+
static const char *
|
129
|
+
cmd_passenger_user(cmd_parms *cmd, void *pcfg, const char *arg) {
|
130
|
+
DirConfig *config = (DirConfig *) pcfg;
|
131
|
+
config->user = arg;
|
132
|
+
return NULL;
|
133
|
+
}
|
134
|
+
|
135
|
+
static const char *
|
136
|
+
cmd_passenger_group(cmd_parms *cmd, void *pcfg, const char *arg) {
|
137
|
+
DirConfig *config = (DirConfig *) pcfg;
|
138
|
+
config->group = arg;
|
139
|
+
return NULL;
|
140
|
+
}
|
141
|
+
|
142
|
+
static const char *
|
143
|
+
cmd_passenger_error_override(cmd_parms *cmd, void *pcfg, const char *arg) {
|
144
|
+
DirConfig *config = (DirConfig *) pcfg;
|
145
|
+
config->errorOverride =
|
146
|
+
arg ?
|
147
|
+
DirConfig::ENABLED :
|
148
|
+
DirConfig::DISABLED;
|
149
|
+
return NULL;
|
150
|
+
}
|
151
|
+
|
152
|
+
static const char *
|
153
|
+
cmd_passenger_max_requests(cmd_parms *cmd, void *pcfg, const char *arg) {
|
154
|
+
DirConfig *config = (DirConfig *) pcfg;
|
155
|
+
char *end;
|
156
|
+
long result;
|
157
|
+
|
158
|
+
result = strtol(arg, &end, 10);
|
159
|
+
if (*end != '\0') {
|
160
|
+
string message = "Invalid number specified for ";
|
161
|
+
message.append(cmd->directive->directive);
|
162
|
+
message.append(".");
|
163
|
+
|
164
|
+
char *messageStr = (char *) apr_palloc(cmd->temp_pool,
|
165
|
+
message.size() + 1);
|
166
|
+
memcpy(messageStr, message.c_str(), message.size() + 1);
|
167
|
+
return messageStr;
|
168
|
+
} else if (result < 0) {
|
169
|
+
string message = "Value for ";
|
170
|
+
message.append(cmd->directive->directive);
|
171
|
+
message.append(" must be greater than or equal to 0.");
|
172
|
+
|
173
|
+
char *messageStr = (char *) apr_palloc(cmd->temp_pool,
|
174
|
+
message.size() + 1);
|
175
|
+
memcpy(messageStr, message.c_str(), message.size() + 1);
|
176
|
+
return messageStr;
|
177
|
+
} else {
|
178
|
+
config->maxRequests = (int) result;
|
179
|
+
return NULL;
|
180
|
+
}
|
181
|
+
}
|
182
|
+
|
183
|
+
static const char *
|
184
|
+
cmd_passenger_start_timeout(cmd_parms *cmd, void *pcfg, const char *arg) {
|
185
|
+
DirConfig *config = (DirConfig *) pcfg;
|
186
|
+
char *end;
|
187
|
+
long result;
|
188
|
+
|
189
|
+
result = strtol(arg, &end, 10);
|
190
|
+
if (*end != '\0') {
|
191
|
+
string message = "Invalid number specified for ";
|
192
|
+
message.append(cmd->directive->directive);
|
193
|
+
message.append(".");
|
194
|
+
|
195
|
+
char *messageStr = (char *) apr_palloc(cmd->temp_pool,
|
196
|
+
message.size() + 1);
|
197
|
+
memcpy(messageStr, message.c_str(), message.size() + 1);
|
198
|
+
return messageStr;
|
199
|
+
} else if (result < 1) {
|
200
|
+
string message = "Value for ";
|
201
|
+
message.append(cmd->directive->directive);
|
202
|
+
message.append(" must be greater than or equal to 1.");
|
203
|
+
|
204
|
+
char *messageStr = (char *) apr_palloc(cmd->temp_pool,
|
205
|
+
message.size() + 1);
|
206
|
+
memcpy(messageStr, message.c_str(), message.size() + 1);
|
207
|
+
return messageStr;
|
208
|
+
} else {
|
209
|
+
config->startTimeout = (int) result;
|
210
|
+
return NULL;
|
211
|
+
}
|
212
|
+
}
|
213
|
+
|
214
|
+
static const char *
|
215
|
+
cmd_passenger_high_performance(cmd_parms *cmd, void *pcfg, const char *arg) {
|
216
|
+
DirConfig *config = (DirConfig *) pcfg;
|
217
|
+
config->highPerformance =
|
218
|
+
arg ?
|
219
|
+
DirConfig::ENABLED :
|
220
|
+
DirConfig::DISABLED;
|
221
|
+
return NULL;
|
222
|
+
}
|
223
|
+
|
224
|
+
static const char *
|
225
|
+
cmd_passenger_enabled(cmd_parms *cmd, void *pcfg, const char *arg) {
|
226
|
+
DirConfig *config = (DirConfig *) pcfg;
|
227
|
+
config->enabled =
|
228
|
+
arg ?
|
229
|
+
DirConfig::ENABLED :
|
230
|
+
DirConfig::DISABLED;
|
231
|
+
return NULL;
|
232
|
+
}
|
233
|
+
|
234
|
+
static const char *
|
235
|
+
cmd_passenger_max_request_queue_size(cmd_parms *cmd, void *pcfg, const char *arg) {
|
236
|
+
DirConfig *config = (DirConfig *) pcfg;
|
237
|
+
char *end;
|
238
|
+
long result;
|
239
|
+
|
240
|
+
result = strtol(arg, &end, 10);
|
241
|
+
if (*end != '\0') {
|
242
|
+
string message = "Invalid number specified for ";
|
243
|
+
message.append(cmd->directive->directive);
|
244
|
+
message.append(".");
|
245
|
+
|
246
|
+
char *messageStr = (char *) apr_palloc(cmd->temp_pool,
|
247
|
+
message.size() + 1);
|
248
|
+
memcpy(messageStr, message.c_str(), message.size() + 1);
|
249
|
+
return messageStr;
|
250
|
+
} else if (result < 0) {
|
251
|
+
string message = "Value for ";
|
252
|
+
message.append(cmd->directive->directive);
|
253
|
+
message.append(" must be greater than or equal to 0.");
|
254
|
+
|
255
|
+
char *messageStr = (char *) apr_palloc(cmd->temp_pool,
|
256
|
+
message.size() + 1);
|
257
|
+
memcpy(messageStr, message.c_str(), message.size() + 1);
|
258
|
+
return messageStr;
|
259
|
+
} else {
|
260
|
+
config->maxRequestQueueSize = (int) result;
|
261
|
+
return NULL;
|
262
|
+
}
|
263
|
+
}
|
264
|
+
|
265
|
+
static const char *
|
266
|
+
cmd_passenger_max_preloader_idle_time(cmd_parms *cmd, void *pcfg, const char *arg) {
|
267
|
+
DirConfig *config = (DirConfig *) pcfg;
|
268
|
+
char *end;
|
269
|
+
long result;
|
270
|
+
|
271
|
+
result = strtol(arg, &end, 10);
|
272
|
+
if (*end != '\0') {
|
273
|
+
string message = "Invalid number specified for ";
|
274
|
+
message.append(cmd->directive->directive);
|
275
|
+
message.append(".");
|
276
|
+
|
277
|
+
char *messageStr = (char *) apr_palloc(cmd->temp_pool,
|
278
|
+
message.size() + 1);
|
279
|
+
memcpy(messageStr, message.c_str(), message.size() + 1);
|
280
|
+
return messageStr;
|
281
|
+
} else if (result < 0) {
|
282
|
+
string message = "Value for ";
|
283
|
+
message.append(cmd->directive->directive);
|
284
|
+
message.append(" must be greater than or equal to 0.");
|
285
|
+
|
286
|
+
char *messageStr = (char *) apr_palloc(cmd->temp_pool,
|
287
|
+
message.size() + 1);
|
288
|
+
memcpy(messageStr, message.c_str(), message.size() + 1);
|
289
|
+
return messageStr;
|
290
|
+
} else {
|
291
|
+
config->maxPreloaderIdleTime = (int) result;
|
292
|
+
return NULL;
|
293
|
+
}
|
294
|
+
}
|
295
|
+
|
296
|
+
static const char *
|
297
|
+
cmd_passenger_load_shell_envvars(cmd_parms *cmd, void *pcfg, const char *arg) {
|
298
|
+
DirConfig *config = (DirConfig *) pcfg;
|
299
|
+
config->loadShellEnvvars =
|
300
|
+
arg ?
|
301
|
+
DirConfig::ENABLED :
|
302
|
+
DirConfig::DISABLED;
|
303
|
+
return NULL;
|
304
|
+
}
|
305
|
+
|
306
|
+
static const char *
|
307
|
+
cmd_passenger_buffer_upload(cmd_parms *cmd, void *pcfg, const char *arg) {
|
308
|
+
DirConfig *config = (DirConfig *) pcfg;
|
309
|
+
config->bufferUpload =
|
310
|
+
arg ?
|
311
|
+
DirConfig::ENABLED :
|
312
|
+
DirConfig::DISABLED;
|
313
|
+
return NULL;
|
314
|
+
}
|
315
|
+
|
316
|
+
static const char *
|
317
|
+
cmd_passenger_app_type(cmd_parms *cmd, void *pcfg, const char *arg) {
|
318
|
+
DirConfig *config = (DirConfig *) pcfg;
|
319
|
+
config->appType = arg;
|
320
|
+
return NULL;
|
321
|
+
}
|
322
|
+
|
323
|
+
static const char *
|
324
|
+
cmd_passenger_startup_file(cmd_parms *cmd, void *pcfg, const char *arg) {
|
325
|
+
DirConfig *config = (DirConfig *) pcfg;
|
326
|
+
config->startupFile = arg;
|
327
|
+
return NULL;
|
328
|
+
}
|
329
|
+
|
330
|
+
static const char *
|
331
|
+
cmd_passenger_sticky_sessions(cmd_parms *cmd, void *pcfg, const char *arg) {
|
332
|
+
DirConfig *config = (DirConfig *) pcfg;
|
333
|
+
config->stickySessions =
|
334
|
+
arg ?
|
335
|
+
DirConfig::ENABLED :
|
336
|
+
DirConfig::DISABLED;
|
337
|
+
return NULL;
|
338
|
+
}
|
339
|
+
|
340
|
+
static const char *
|
341
|
+
cmd_passenger_sticky_sessions_cookie_name(cmd_parms *cmd, void *pcfg, const char *arg) {
|
342
|
+
DirConfig *config = (DirConfig *) pcfg;
|
343
|
+
config->stickySessionsCookieName =
|
344
|
+
arg ?
|
345
|
+
DirConfig::ENABLED :
|
346
|
+
DirConfig::DISABLED;
|
347
|
+
return NULL;
|
348
|
+
}
|
349
|
+
|
350
|
+
static const char *
|
351
|
+
cmd_passenger_show_version_in_header(cmd_parms *cmd, void *pcfg, const char *arg) {
|
352
|
+
DirConfig *config = (DirConfig *) pcfg;
|
353
|
+
config->showVersionInHeader =
|
354
|
+
arg ?
|
355
|
+
DirConfig::ENABLED :
|
356
|
+
DirConfig::DISABLED;
|
357
|
+
return NULL;
|
358
|
+
}
|
359
|
+
|
360
|
+
static const char *
|
361
|
+
cmd_passenger_friendly_error_pages(cmd_parms *cmd, void *pcfg, const char *arg) {
|
362
|
+
DirConfig *config = (DirConfig *) pcfg;
|
363
|
+
config->friendlyErrorPages =
|
364
|
+
arg ?
|
365
|
+
DirConfig::ENABLED :
|
366
|
+
DirConfig::DISABLED;
|
367
|
+
return NULL;
|
368
|
+
}
|
369
|
+
|
370
|
+
static const char *
|
371
|
+
cmd_passenger_restart_dir(cmd_parms *cmd, void *pcfg, const char *arg) {
|
372
|
+
DirConfig *config = (DirConfig *) pcfg;
|
373
|
+
config->restartDir = arg;
|
374
|
+
return NULL;
|
375
|
+
}
|
376
|
+
|
377
|
+
static const char *
|
378
|
+
cmd_passenger_app_group_name(cmd_parms *cmd, void *pcfg, const char *arg) {
|
379
|
+
DirConfig *config = (DirConfig *) pcfg;
|
380
|
+
config->appGroupName = arg;
|
381
|
+
return NULL;
|
382
|
+
}
|
383
|
+
|
384
|
+
static const char *
|
385
|
+
cmd_passenger_force_max_concurrent_requests_per_process(cmd_parms *cmd, void *pcfg, const char *arg) {
|
386
|
+
DirConfig *config = (DirConfig *) pcfg;
|
387
|
+
char *end;
|
388
|
+
long result;
|
389
|
+
|
390
|
+
result = strtol(arg, &end, 10);
|
391
|
+
if (*end != '\0') {
|
392
|
+
string message = "Invalid number specified for ";
|
393
|
+
message.append(cmd->directive->directive);
|
394
|
+
message.append(".");
|
395
|
+
|
396
|
+
char *messageStr = (char *) apr_palloc(cmd->temp_pool,
|
397
|
+
message.size() + 1);
|
398
|
+
memcpy(messageStr, message.c_str(), message.size() + 1);
|
399
|
+
return messageStr;
|
400
|
+
} else {
|
401
|
+
config->forceMaxConcurrentRequestsPerProcess = (int) result;
|
402
|
+
return NULL;
|
403
|
+
}
|
404
|
+
}
|
405
|
+
|
406
|
+
static const char *
|
407
|
+
cmd_passenger_lve_min_uid(cmd_parms *cmd, void *pcfg, const char *arg) {
|
408
|
+
DirConfig *config = (DirConfig *) pcfg;
|
409
|
+
char *end;
|
410
|
+
long result;
|
411
|
+
|
412
|
+
result = strtol(arg, &end, 10);
|
413
|
+
if (*end != '\0') {
|
414
|
+
string message = "Invalid number specified for ";
|
415
|
+
message.append(cmd->directive->directive);
|
416
|
+
message.append(".");
|
417
|
+
|
418
|
+
char *messageStr = (char *) apr_palloc(cmd->temp_pool,
|
419
|
+
message.size() + 1);
|
420
|
+
memcpy(messageStr, message.c_str(), message.size() + 1);
|
421
|
+
return messageStr;
|
422
|
+
} else if (result < 0) {
|
423
|
+
string message = "Value for ";
|
424
|
+
message.append(cmd->directive->directive);
|
425
|
+
message.append(" must be greater than or equal to 0.");
|
426
|
+
|
427
|
+
char *messageStr = (char *) apr_palloc(cmd->temp_pool,
|
428
|
+
message.size() + 1);
|
429
|
+
memcpy(messageStr, message.c_str(), message.size() + 1);
|
430
|
+
return messageStr;
|
431
|
+
} else {
|
432
|
+
config->lveMinUid = (int) result;
|
433
|
+
return NULL;
|
434
|
+
}
|
435
|
+
}
|
481
436
|
|