TT#52628 Fix serving autoprov firmwares for unknown macs

We need to detach in chain base, otherwise chain tail will access
undefined dev variable from stash and will produce a 500 server error.

Change-Id: I9ac5d18b365efd2390cb2800ec5adadd4992e989
changes/10/27210/2
Andreas Granig 7 years ago
parent ea25662c18
commit ca97df400d

@ -1850,6 +1850,7 @@ sub dev_field_firmware_base :Chained('/') :PathPart('device/autoprov/firmware')
$c->response->body("404 - device not found");
}
$c->response->status(404);
$c->detach();
return;
}
$id =~ s/^([^\=]+)\=0$/$1/;
@ -1866,6 +1867,7 @@ sub dev_field_firmware_base :Chained('/') :PathPart('device/autoprov/firmware')
$c->response->body("404 - device not found");
}
$c->response->status(404);
$c->detach();
return;
}
@ -1907,6 +1909,7 @@ sub dev_field_firmware_version_base :Chained('dev_field_firmware_base') :PathPar
$c->response->body("404 - firmware not found");
}
$c->response->status(404);
$c->detach();
return;
}

Loading…
Cancel
Save