Open Bug 1943315 Opened 1 year ago Updated 1 year ago

"Save Response As" action in devtools:network tab saves truncated json

Categories

(DevTools :: Netmonitor, defect, P3)

Firefox 132
defect

Tracking

(Not tracked)

People

(Reporter: Akiyamka, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:132.0) Gecko/20100101 Firefox/132.0

Steps to reproduce:

  1. Open DevTools on Network tab
  2. Wait for request with ~4MB JSON response body
  3. Right-click this response
  4. Click "Save Response As" option in dropdown menu
  5. Select save location
  6. Wait for download to complete (no progress indicator, waited ~30 seconds for 3-second response)

Actual results:

Saved file is truncated to match devtools.netmonitor.responseBodyLimit setting size
(1 MiB by default)

Expected results:

devtools.netmonitor.responseBodyLimit should only affect UI display
"Save Response As" should save complete response

The Bugbug bot thinks this bug should belong to the 'DevTools::Netmonitor' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Netmonitor
Product: Firefox → DevTools

The only way we can save the whole response is to do another request at this point because we don't store response bodies which are over the limit.

One option is to show a notification after downloading the file to propose to do another request + download.

Severity: -- → S3
Priority: -- → P3
Summary: "Save Response As" action in devtools:network tab saves turncated json → "Save Response As" action in devtools:network tab saves truncated json

As mentioned in https://phabricator.services.mozilla.com/D219220, this will also impact the feature to set overrides from the network monitor, as only the truncated response would be copied over to the override.

Status: UNCONFIRMED → NEW
Ever confirmed: true

If making this work is hard, can we disable the menu item in cases where the response would be incomplete?

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: