test: fix dockerproxy test
This commit is contained in:
@@ -104,7 +104,7 @@ async function containersCreate(req, res, next) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
function process(req, res, next) {
|
||||
// we have to rebuild the body since we consumed in in the parser
|
||||
if (Object.keys(req.body).length !== 0) {
|
||||
if (req.body && Object.keys(req.body).length !== 0) {
|
||||
const plainBody = JSON.stringify(req.body);
|
||||
req.dockerRequest.setHeader('Content-Length', Buffer.byteLength(plainBody));
|
||||
req.dockerRequest.end(plainBody);
|
||||
|
||||
Reference in New Issue
Block a user