1 | ;
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | function 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 | }
|
15 | exports.getContentLength = getContentLength;
|