nghttpx: Show warning if certain feature is not compiled in
This commit is contained in:
parent
6d46249b7b
commit
c30d252f94
|
@ -1946,11 +1946,7 @@ int main(int argc, char **argv) {
|
|||
cmdcfgs.emplace_back(SHRPX_OPT_INSECURE, "yes");
|
||||
break;
|
||||
case 'n':
|
||||
#ifdef NOTHREADS
|
||||
LOG(WARN) << "Threading disabled at build time, no threads created.";
|
||||
#else
|
||||
cmdcfgs.emplace_back(SHRPX_OPT_WORKERS, optarg);
|
||||
#endif // NOTHREADS
|
||||
break;
|
||||
case 'o':
|
||||
cmdcfgs.emplace_back(SHRPX_OPT_FRONTEND_FRAME_DEBUG, "yes");
|
||||
|
|
|
@ -1373,7 +1373,12 @@ int parse_config(const char *opt, const char *optarg,
|
|||
return 0;
|
||||
}
|
||||
case SHRPX_OPTID_WORKERS:
|
||||
#ifdef NOTHREADS
|
||||
LOG(WARN) << "Threading disabled at build time, no threads created.";
|
||||
return 0;
|
||||
#else // !NOTHREADS
|
||||
return parse_uint(&mod_config()->num_worker, opt, optarg);
|
||||
#endif // !NOTHREADS
|
||||
case SHRPX_OPTID_HTTP2_MAX_CONCURRENT_STREAMS:
|
||||
return parse_uint(&mod_config()->http2_max_concurrent_streams, opt, optarg);
|
||||
case SHRPX_OPTID_LOG_LEVEL:
|
||||
|
@ -1949,12 +1954,20 @@ int parse_config(const char *opt, const char *optarg,
|
|||
return parse_uint(&mod_config()->tls_ticket_key_memcached_max_fail, opt,
|
||||
optarg);
|
||||
case SHRPX_OPTID_REQUEST_PHASE_FILE:
|
||||
#ifdef HAVE_MRUBY
|
||||
mod_config()->request_phase_file = strcopy(optarg);
|
||||
|
||||
#else // !HAVE_MRUBY
|
||||
LOG(WARN) << opt
|
||||
<< ": ignored because mruby support is disabled at build time.";
|
||||
#endif // !HAVE_MRUBY
|
||||
return 0;
|
||||
case SHRPX_OPTID_RESPONSE_PHASE_FILE:
|
||||
#ifdef HAVE_MRUBY
|
||||
mod_config()->response_phase_file = strcopy(optarg);
|
||||
|
||||
#else // !HAVE_MRUBY
|
||||
LOG(WARN) << opt
|
||||
<< ": ignored because mruby support is disabled at build time.";
|
||||
#endif // !HAVE_MRUBY
|
||||
return 0;
|
||||
case SHRPX_OPTID_CONF:
|
||||
LOG(WARN) << "conf: ignored";
|
||||
|
|
Loading…
Reference in New Issue