Skip to content

Commit

Permalink
Corrected fallback responseHeaders value to be null. (#4110)
Browse files Browse the repository at this point in the history
- The return value should match that of the function XMLHttpRequest.getAllResponseHeaders() which returns a string, or null if no response headers have been received, or empty string on a network error.
  • Loading branch information
piersoh committed Jan 11, 2023
1 parent f4d45c7 commit b679325
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/streaming/net/HTTPLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ function HTTPLoader(cfg) {
const responseUrl = httpRequest.response ? httpRequest.response.responseURL : null;
const responseStatus = httpRequest.response ? httpRequest.response.status : null;
const responseHeaders = httpRequest.response && httpRequest.response.getAllResponseHeaders ? httpRequest.response.getAllResponseHeaders() :
httpRequest.response ? httpRequest.response.responseHeaders : [];
httpRequest.response ? httpRequest.response.responseHeaders : null;

dashMetrics.addHttpRequest(request, responseUrl, responseStatus, responseHeaders, success ? traces : null);

Expand Down

0 comments on commit b679325

Please sign in to comment.