|
1 | 1 | import {getHeader} from "../../helpers/har";
|
2 | 2 | import {
|
3 |
| - formatBytes, formatDateLocalized, formatMilliseconds, parseAndFormat, parseDate, parseNonEmpty, |
| 3 | + formatBytes, formatDateLocalized, formatMilliseconds, formatSeconds, parseAndFormat, parseDate, parseNonEmpty, |
4 | 4 | parseNonNegative, parsePositive,
|
5 | 5 | } from "../../helpers/parse";
|
6 | 6 | import {Entry, Header} from "../../typing/har";
|
@@ -31,7 +31,7 @@ function parseGeneralDetails(entry: WaterfallEntry, requestID: number): KvTuple[
|
31 | 31 | ["IP", harEntry._ip_addr],
|
32 | 32 | ["Client Port", parseAndFormat(harEntry._client_port, parsePositive)],
|
33 | 33 | ["Expires", harEntry._expires],
|
34 |
| - ["Cache Time", parseAndFormat(harEntry._cache_time, parsePositive)], |
| 34 | + ["Cache Time", parseAndFormat(harEntry._cache_time, parsePositive, formatSeconds)], |
35 | 35 | ["CDN Provider", harEntry._cdn_provider],
|
36 | 36 | byteSizeProperty("ObjectSize", harEntry._objectSize),
|
37 | 37 | byteSizeProperty("Bytes In (downloaded)", harEntry._bytesIn),
|
@@ -113,7 +113,7 @@ function parseResponseDetails(harEntry: Entry): KvTuple[] {
|
113 | 113 | stringHeader("Connection"),
|
114 | 114 | stringHeader("ETag"),
|
115 | 115 | stringHeader("Accept-Patch"),
|
116 |
| - stringHeader("Age"), |
| 116 | + ["Age", parseAndFormat(getHeader(headers, "Age"), parseNonNegative, formatSeconds)], |
117 | 117 | stringHeader("Allow"),
|
118 | 118 | stringHeader("Content-Disposition"),
|
119 | 119 | stringHeader("Location"),
|
|
0 commit comments