Closed Bug 1571449 Opened 2 years ago Closed 2 years ago

Invalid "Response has been truncated" message displayed when devtools.netmonitor.responseBodyLimit=0

Categories

(DevTools :: Netmonitor, defect, P3)

68 Branch
defect

Tracking

(firefox70 fixed)

RESOLVED FIXED
Firefox 70
Tracking Status
firefox70 --- fixed

People

(Reporter: 7cf148fd, Assigned: Towkir)

Details

(Keywords: good-first-bug)

Attachments

(2 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:60.0) Gecko/20100101 Firefox/60.0

Steps to reproduce:

Using Firefox Quantum 68.0.1 (64 bit) on MacOS
Set devtools.netmonitor.responseBodyLimit to 0 to prevent responses from being truncated in the dev tools
Restart the browser and load any page

Actual results:

In the Developers Tools / Request Details panel / Response tab, for each and every element that is not a picture, the response is indeed not truncated but a "Response has been truncated" message (with a Red background) is displayed on top of the Response payload.

Expected results:

The "Response has been truncated" message on red background should not appear when devtools.netmonitor.responseBodyLimit is equal to 0.

Following my comment on Bug 1223726

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Netmonitor
Product: Firefox → DevTools

Thanks for the report!
Honza

Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P3

The faulty code is in devtools/client/netmonitor/src/components/ResponsePanel.js

106 if (limit <= request.responseContent.content.size) {

should be

106 if ( limit > 0 && limit <= request.responseContent.content.size ) {

Sorry I don't have a mercurial instance at hand to commit this myself.

Thanks for the pointer!

Honza

Keywords: good-first-bug
https://phabricator.services.mozilla.com/D40884

Is this how we push codes for review now honza ?

Assignee: nobody → 3ugzilla
Status: NEW → ASSIGNED

(In reply to [:Towkir] Ahmed from comment #8)

Is this how we push codes for review now honza ?

Yes, thanks for the patch!

Honza

Pushed by jodvarko@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/24417b4ad42e
Invalid "Response has been truncated" message display condition fixed. r=Honza
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 70
QA Whiteboard: [qa-70b-p2]
You need to log in before you can comment on or make changes to this bug.