UNPKG

468 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3function getContentLength(ctx) {
4 var responseContentLength = ctx.response.get('Content-Length');
5 if (responseContentLength) {
6 try {
7 return parseInt(responseContentLength, 10);
8 }
9 catch (err) {
10 // this is a non-critical error, so we can continue execution.
11 }
12 }
13 return null;
14}
15exports.getContentLength = getContentLength;