Skip to content

Commit

Permalink
fix: Fix missing originalUri in response filters (shaka-project#5114)
Browse files Browse the repository at this point in the history
  • Loading branch information
avelad committed Mar 23, 2023
1 parent b60bf16 commit 8bffb99
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
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
Expand Up @@ -3429,7 +3429,12 @@ describe('StreamingEngine', () => {
netEngine.request.and.callFake((requestType, request, context) => {
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
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 8bffb99

Please sign in to comment.