Don't escape and decode network response payloads
Summary: This was originally done in https://github.com/facebook/flipper/pull/377 to support chinese characters, but it's not clear how it works, or what problem specifically it is trying to solve. It's causing some problems where valid responses are failing to be "decoded", so I'm removing it. Reviewed By: mweststrate Differential Revision: D22866879 fbshipit-source-id: a19a57b0ddba2b9f434eb3c37e6b92da1dfbef01
This commit is contained in:
committed by
Facebook GitHub Bot
parent
6458541163
commit
45d461a3b8
@@ -31,9 +31,7 @@ export function decodeBody(container: Request | Response): string {
|
||||
return decompress(b64Decoded);
|
||||
}
|
||||
|
||||
// Data is transferred as base64 encoded bytes to support unicode characters,
|
||||
// we need to decode the bytes here to display the correct unicode characters.
|
||||
return decodeURIComponent(escape(b64Decoded));
|
||||
return b64Decoded;
|
||||
} catch (e) {
|
||||
console.warn('Discarding malformed body, size: ' + b64Decoded.length);
|
||||
return '';
|
||||
|
||||
Reference in New Issue
Block a user