Skip to content

Commit

Permalink
fix: Fix missing originalUri in response filters (#5114)
Browse files Browse the repository at this point in the history
  • Loading branch information
avelad authored and joeyparrish committed Apr 26, 2023
1 parent cfcca8e commit ed398b8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions externs/shaka/net.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ shaka.extern.Request;
/**
* @typedef {{
* uri: string,
* originalUri: string,
* data: BufferSource,
* status: (number|undefined),
* headers: !Object.<string, string>,
Expand Down
7 changes: 6 additions & 1 deletion test/media/streaming_engine_unit.js
Original file line number Diff line number Diff line change
Expand Up @@ -3412,7 +3412,12 @@ describe('StreamingEngine', () => {
netEngine.request.and.callFake((requestType, request) => {
const buffer = new ArrayBuffer(0);
/** @type {shaka.extern.Response} */
const response = {uri: request.uris[0], data: buffer, headers: {}};
const response = {
uri: request.uris[0],
originalUri: request.uris[0],
data: buffer,
headers: {},
};
return shaka.util.AbortableOperation.completed(response);
});

Expand Down
7 changes: 6 additions & 1 deletion test/net/networking_engine_unit.js
Original file line number Diff line number Diff line change
Expand Up @@ -1226,6 +1226,11 @@ describe('NetworkingEngine', /** @suppress {accessControls} */ () => {

/** @return {shaka.extern.Response} */
function createResponse() {
return {uri: '', data: new ArrayBuffer(5), headers: {}};
return {
uri: '',
originalUri: '',
data: new ArrayBuffer(5),
headers: {},
};
}
}); // describe('NetworkingEngine')

0 comments on commit ed398b8

Please sign in to comment.