|
1 | 1 | import {getHeader} from "../../helpers/har";
|
2 | 2 | import {
|
3 |
| - formatBytes, formatDateLocalized, formatMilliseconds, parseAndFormat, parseDate, |
| 3 | + formatBytes, formatDateLocalized, formatMilliseconds, parseAndFormat, parseDate, parseNonEmpty, |
4 | 4 | parseNonNegative, parsePositive,
|
5 | 5 | } from "../../helpers/parse";
|
6 | 6 | import {Entry, Header} from "../../typing/har";
|
@@ -57,7 +57,7 @@ function parseRequestDetails(harEntry: Entry): KvTuple[] {
|
57 | 57 | byteSizeProperty("Bytes Out (uploaded)", harEntry._bytesOut),
|
58 | 58 | byteSizeProperty("Headers Size", request.headersSize),
|
59 | 59 | byteSizeProperty("Body Size", request.bodySize),
|
60 |
| - ["Comment", request.comment], |
| 60 | + ["Comment", parseAndFormat(request.comment, parseNonEmpty)], |
61 | 61 | stringHeader("User-Agent"),
|
62 | 62 | stringHeader("Host"),
|
63 | 63 | stringHeader("Connection"),
|
@@ -119,8 +119,8 @@ function parseResponseDetails(harEntry: Entry): KvTuple[] {
|
119 | 119 | stringHeader("Upgrade"),
|
120 | 120 | stringHeader("Vary"),
|
121 | 121 | stringHeader("Timing-Allow-Origin"),
|
122 |
| - ["Redirect URL", response.redirectURL], |
123 |
| - ["Comment", response.comment], |
| 122 | + ["Redirect URL", parseAndFormat(response.redirectURL, parseNonEmpty)], |
| 123 | + ["Comment", parseAndFormat(response.comment, parseNonEmpty)], |
124 | 124 | ];
|
125 | 125 | }
|
126 | 126 |
|
|
0 commit comments