View | Details | Raw Unified | Return to bug 41887
Collapse All | Expand All

(-)server/core.c (-3 / +9 lines)
Lines 1124-1133 Link Here
1124
    if (err != NULL) {
1124
    if (err != NULL) {
1125
        return err;
1125
        return err;
1126
    }
1126
    }
1127
1127
1128
    /* TODO: ap_configtestonly && ap_docrootcheck && */
1128
    //When ap_document_root_check is false; skip all the stuff below
1129
    if (!ap_document_root_check) {
1130
       conf->ap_document_root = arg;
1131
       return NULL;
1132
    }
1133
1134
    /* TODO: ap_configtestonly */
1129
    /* XXX Shouldn't this be relative to ServerRoot ??? */
1135
    /* XXX Shouldn't this be relative to ServerRoot ??? */
1130
    if (apr_filepath_merge((char**)&conf->ap_document_root, NULL, arg,
1136
    else if (apr_filepath_merge((char**)&conf->ap_document_root, NULL, arg,
1131
                           APR_FILEPATH_TRUENAME, cmd->pool) != APR_SUCCESS
1137
                           APR_FILEPATH_TRUENAME, cmd->pool) != APR_SUCCESS
1132
        || !ap_is_directory(cmd->pool, arg)) {
1138
        || !ap_is_directory(cmd->pool, arg)) {
1133
        if (cmd->server->is_virtual) {
1139
        if (cmd->server->is_virtual) {
(-)server/main.c (-3 / +12 lines)
Lines 285-291 Link Here
285
                 pad);
285
                 pad);
286
#endif
286
#endif
287
    ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
287
    ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
288
                 "       %s [-v] [-V] [-h] [-l] [-L] [-t] [-S]", pad);
288
                 "       %s [-v] [-V] [-h] [-l] [-L] [-t] [-T] [-S]", pad);
289
    ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
289
    ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
290
                 "Options:");
290
                 "Options:");
Lines 360-369 Link Here
360
                 "  -S                : a synonym for -t -D DUMP_VHOSTS");
360
                 "  -S                : a synonym for -t -D DUMP_VHOSTS");
361
    ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
361
    ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
362
                 "  -t                : run syntax check for config files");
362
                 "  -t                : run syntax check for config files");
363
363
    ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
364
                "  -T                : start without DocumentRoot(s) check");
365
364
    destroy_and_exit_process(process, 1);
366
    destroy_and_exit_process(process, 1);
365
}
367
}
368
//Set ap_document_root_check to default value: true
369
int ap_document_root_check = 1;
370
366
int main(int argc, const char * const argv[])
371
int main(int argc, const char * const argv[])
367
{
372
{
368
    char c;
373
    char c;
Lines 501-507 Link Here
501
        case 't':
506
        case 't':
502
            configtestonly = 1;
507
            configtestonly = 1;
503
            break;
508
            break;
504
509
510
       case 'T':
511
           ap_document_root_check = 0;
512
           break;
513
505
        case 'S':
514
        case 'S':
506
            configtestonly = 1;
515
            configtestonly = 1;
507
            new = (char **)apr_array_push(ap_server_config_defines);
516
            new = (char **)apr_array_push(ap_server_config_defines);
(-)include/http_main.h (-1 / +4 lines)
Lines 23-29 Link Here
23
 * in apr_getopt() format.  Use this for default'ing args that the MPM
23
 * in apr_getopt() format.  Use this for default'ing args that the MPM
24
 * can safely ignore and pass on from its rewrite_args() handler.
24
 * can safely ignore and pass on from its rewrite_args() handler.
25
 */
25
 */
26
#define AP_SERVER_BASEARGS "C:c:D:d:E:e:f:vVlLtSh?X"
26
#define AP_SERVER_BASEARGS "C:c:D:d:E:e:f:vVlLtTSh?X"
27
#ifdef __cplusplus
27
#ifdef __cplusplus
28
extern "C" {
28
extern "C" {
Lines 49-54 Link Here
49
 *  effect the server based on command line options */
49
 *  effect the server based on command line options */
50
AP_DECLARE_DATA extern apr_array_header_t *ap_server_config_defines;
50
AP_DECLARE_DATA extern apr_array_header_t *ap_server_config_defines;
51
/** Available integer for using -T switch */
52
AP_DECLARE_DATA extern int ap_document_root_check;
53
51
APR_DECLARE_OPTIONAL_FN(int, ap_signal_server, (int *, apr_pool_t *));
54
APR_DECLARE_OPTIONAL_FN(int, ap_signal_server, (int *, apr_pool_t *));
52
#ifdef __cplusplus
55
#ifdef __cplusplus

Return to bug 41887