postmanlabs / postman-app-support

Postman is an API platform for building and using APIs. Postman simplifies each step of the API lifecycle and streamlines collaboration so you can create better APIs—faster.
https://www.postman.com
5.81k stars 839 forks source link

response size wrong #13043

Closed noobjun closed 1 month ago

noobjun commented 1 month ago

Is there an existing issue for this?

Describe the Issue

sometimes i see wrong response size, it only seems to happen when the response payload is under 1MB for example i have a service returns this payload `{"took":904,"timed_out":false,"_shards":{"total":16,"successful":16,"skipped":0,"failed":0},"hits":{"total":{"value":10000,"relation":"gte"},"max_score":7.5323896,"hits":[{"_index":"listings","_type":"_doc","_id":"QgRbB5EBnYV256IVvnnE","_score":7.5323896}, .... // there are ~60000 rows of this, but i can't post it all due to size restriction ]

full payload here: https://pastebin.ai/5yr9nuh0s4 the response size should be 913 KB but postman says it's 71.24 KB

Steps To Reproduce

  1. fire a request to some service which can return a lot of data
  2. make sure the data returned by the service is less than 1MB but also not too far from 1MB.
  3. check the postman UI strip which displays the wrong data size

Screenshots or Videos

image

Operating System

Mac OS Sonoma

Postman Version

Version 11.5.1

Postman Platform

Postman App

User Account Type

Signed In User

Additional Context?

No response

parthverma1 commented 1 month ago

Hi, The response size in the status bar indicates the total size of the response (headers + body). You can hover over the size label to view a breakdown.

The response body size should be equal to Compressed body size if there was any compression. Can you check the response headers table to check if Content-Encoding header was received and was one of br, gzip or deflate.

We are tracking a similar issue here https://github.com/postmanlabs/postman-app-support/issues/7596

Thanks

noobjun commented 1 month ago

Hi, The response size in the status bar indicates the total size of the response (headers + body). You can hover over the size label to view a breakdown.

The response body size should be equal to Compressed body size if there was any compression. Can you check the response headers table to check if Content-Encoding header was received and was one of br, gzip or deflate.

We are tracking a similar issue here #7596

Thanks

The server always returned gzip'd response in both cases.

Bugged

When payload is slightly less than 1MB (about 900KB) it would show

Screenshot 2024-07-31 at 2 23 50 PM

Correct

When the payload is more than 1MB, it would show everything correctly.

Screenshot 2024-07-31 at 2 23 35 PM

It seems like the latter one is showing the uncompressed size when the former shows the compressed size? I dunno why 1MB threshold makes it behave differently.

parthverma1 commented 1 month ago

This was related to https://github.com/postmanlabs/postman-app-support/issues/7596 and is now resolved with version 11.8 of the app. I am closing this issue for now. Feel free to re-open the issue if the problem recurs.