diff --git a/lib/middleware/body_size_limiter.js b/lib/middleware/body_size_limiter.js
index <HASH>..<HASH> 100644
--- a/lib/middleware/body_size_limiter.js
+++ b/lib/middleware/body_size_limiter.js
@@ -40,7 +40,11 @@ exports.attach = function attachBodySizeLimiter(options) {
         log.msg('Denying client for too large content length', {content_length: cl, max: maxSize});
         res.writeHead(413, {Connection: 'close'});
         res.end();
-        req.transport.close();
+
+        if (req.transport) {
+          req.transport.close();
+        }
+
         return;
       }
     }
@@ -56,7 +60,11 @@ exports.attach = function attachBodySizeLimiter(options) {
         log.msg('Denying client for body too large', {content_length: bodyLen, max: maxSize});
         res.writeHead(413, {Connection: 'close'});
         res.end();
-        req.transport.close();
+
+        if (req.transport) {
+          req.transport.close();
+        }
+
         oversize = true;
       }
     });
Only call close on transport if transport is available. (it's only available in
node < <I>)