nghttpx: Fix mruby parameter validation
This commit is contained in:
parent
87ac872fdc
commit
fc7489e044
|
@ -1056,12 +1056,14 @@ int parse_mapping(Config *config, DownstreamAddrConfig &addr,
|
||||||
// If some backends do not specify mruby file, and there is at
|
// If some backends do not specify mruby file, and there is at
|
||||||
// least one backend with mruby file, it is used for all
|
// least one backend with mruby file, it is used for all
|
||||||
// backends in the group.
|
// backends in the group.
|
||||||
if (g.mruby_file.empty()) {
|
if (!params.mruby.empty()) {
|
||||||
g.mruby_file = make_string_ref(downstreamconf.balloc, params.mruby);
|
if (g.mruby_file.empty()) {
|
||||||
} else if (g.mruby_file != params.mruby) {
|
g.mruby_file = make_string_ref(downstreamconf.balloc, params.mruby);
|
||||||
LOG(ERROR) << "backend: mruby: multiple different mruby file found in "
|
} else if (g.mruby_file != params.mruby) {
|
||||||
"a single group";
|
LOG(ERROR) << "backend: mruby: multiple different mruby file found "
|
||||||
return -1;
|
"in a single group";
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
g.addrs.push_back(addr);
|
g.addrs.push_back(addr);
|
||||||
|
|
Loading…
Reference in New Issue