Skip to content

Commit efce7b8

Browse files
author
Jason Olson
committed
Correct failures for node v0.12
1 parent ab793fc commit efce7b8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/connect_middleware.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,11 @@ function hookResponseForValidation(context, eventEmitter) {
160160
var headers = res._headers || res.headers || {};
161161
var body = data || written;
162162
debugContent('response body type: %s value: %s', typeof body, body);
163-
var validateResult = context.request.swagger.operation.validateResponse({statusCode: res.statusCode, headers, body});
163+
var validateResult = context.request.swagger.operation.validateResponse({
164+
statusCode: res.statusCode,
165+
headers: headers,
166+
body: body
167+
});
164168
debug('validation result:', validateResult);
165169
if (validateResult.errors.length || validateResult.warnings.length) {
166170
debug('emitting responseValidationError');

0 commit comments

Comments
 (0)