Skip to content

Commit 8514d68

Browse files
committed
- fixed bug with empty request body, affects Varnish
1 parent ebcf927 commit 8514d68

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

NodeHttpCodeGenerator.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,9 @@ ${
110110
.on('error', (error) => {
111111
callback(error);
112112
});
113-
request.write(${JSON.stringify(request.body)})
113+
${
114+
(request.body.length > 0) ? ' request.write(' + JSON.stringify(request.body) + ');' : ''
115+
}
114116
request.end();
115117
116118

0 commit comments

Comments
 (0)