New issue
Advanced search Search tips

Issue 771825 link

Starred by 7 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug


Show other hotlists

Hotlists containing this issue:
Hotlist-1


Sign in to add a comment

DevTools: Network.getResponseBody shoult return the same bytes that were sent from server

Project Member Reported by lushnikov@chromium.org, Oct 5 2017

Issue description

The protocol's method Network.getResponseBody returns a string that is decoded according to the Content-Type response header. However, if the content-type is set wrongly, the response body is decoded incorrectly.

It would be helpful to get a raw response body via protocol.
Can we either:
- modify Network.getResponseBody to return base64-encoded string for non-ascii responses
- add another method Network.getRawResponseBody that always returns base64-encoded results?

This surfaced in the PPTR project: https://github.com/GoogleChrome/puppeteer/issues/795

 
I found that invalid characters in the original file (e.g. HTML, JS, etc) stop getResponseBody returning at all. I assume this is related to the conversion hinted at above. A getRawResponseBody would be useful in this case two.

You can find out more in  issue 824174 
Owner: jarhar@chromium.org
Cc: caseq@chromium.org
It sounds like the way we get raw response data could change after the network service migration, and it also sounds like adding a new method with the binary data type would be preferred. I will reassess this after more is done with network service.
All in for a new method! ❤️

Sign in to add a comment