2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-11 18:02:32 +03:00

fix(fetch): fix stream handling in Safari by fallback to using a stream reader instead of an async iterator; (#6584)

This commit is contained in:
Dmitriy Mozgovoy
2024-08-31 22:14:23 +03:00
committed by GitHub
parent d584fcfa62
commit d1980854fe
2 changed files with 27 additions and 7 deletions
+2 -2
View File
@@ -146,7 +146,7 @@ export default isFetchSupported && (async (config) => {
progressEventReducer(asyncDecorator(onUploadProgress))
);
data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush, encodeText);
data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
}
}
@@ -189,7 +189,7 @@ export default isFetchSupported && (async (config) => {
trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
flush && flush();
unsubscribe && unsubscribe();
}, encodeText),
}),
options
);
}