| 703fa4b5 | 10-Jul-2023 |
Kudo Chien <[email protected]> |
[core] fix network inspector does not preview response body without content-length header (#23405)
# Why
some responses do not have the `Content-Length` header, and we thought the content-lengt
[core] fix network inspector does not preview response body without content-length header (#23405)
# Why
some responses do not have the `Content-Length` header, and we thought the content-length is zero and not sent the `Network.receivedResponseBody` CDP event.
fixes #23383
close ENG-9261
# How
- sending the `Network.receivedResponseBody` even `Content-Length` is unknown. we only care about our `responseBody` exceeds our 1MB buffer or not.
- moving `Network.loadingFinished` after `Network.receivedResponseBody`. that should be correct order
- [ios only] the `encodedDataLength` should be real bytes transferred on the network without decoding. that pr fixes the semantic correctly. unfortunately, on android okhttp, they don't have an easy way to get the real bytes, so on android we still use the `Content-Length` and may sometimes get `encodedDataLength=-1`
# Test Plan
- test network inspector preview for `fetch("https://api.publicapis.org/entries")`
- unit test passed
show more ...
|