fix: passing content-length down the stream for intercepted requests (#25324)

* fix: pass content length if avilable in headers

* fix: fixed unit test after changes

	video is being played for standard scheme when
	content-length is available

* fix: fixed review remakrs

added is_string check and changed stol to StringToInt64

* fix: fix test case name

* fix: fixed typo
This commit is contained in:
marcin-prochownik 2020-10-06 02:53:13 +02:00 committed by GitHub
parent 6356cd4018
commit fec1c0b68b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 6 deletions

View file

@ -919,11 +919,11 @@ describe('protocol module', () => {
await protocol.unregisterProtocol('stream');
});
it('does not successfully play videos with stream: false on streaming protocols', async () => {
await streamsResponses(standardScheme, 'error');
it('successfully plays videos when content is buffered (stream: false)', async () => {
await streamsResponses(standardScheme, 'play');
});
it('successfully plays videos with stream: true on streaming protocols', async () => {
it('successfully plays videos when streaming content (stream: true)', async () => {
await streamsResponses('stream', 'play');
});