summaryrefslogtreecommitdiffstats
path: root/remote/test/puppeteer/packages/puppeteer-core/src/api/HTTPResponse.ts
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--remote/test/puppeteer/packages/puppeteer-core/src/api/HTTPResponse.ts9
1 files changed, 8 insertions, 1 deletions
diff --git a/remote/test/puppeteer/packages/puppeteer-core/src/api/HTTPResponse.ts b/remote/test/puppeteer/packages/puppeteer-core/src/api/HTTPResponse.ts
index 906479eb43..f5ea35722e 100644
--- a/remote/test/puppeteer/packages/puppeteer-core/src/api/HTTPResponse.ts
+++ b/remote/test/puppeteer/packages/puppeteer-core/src/api/HTTPResponse.ts
@@ -81,11 +81,18 @@ export abstract class HTTPResponse {
/**
* Promise which resolves to a buffer with response body.
+ *
+ * @remarks
+ *
+ * The buffer might be re-encoded by the browser
+ * based on HTTP-headers or other heuristics. If the browser
+ * failed to detect the correct encoding, the buffer might
+ * be encoded incorrectly. See https://github.com/puppeteer/puppeteer/issues/6478.
*/
abstract buffer(): Promise<Buffer>;
/**
- * Promise which resolves to a text representation of response body.
+ * Promise which resolves to a text (utf8) representation of response body.
*/
async text(): Promise<string> {
const content = await this.buffer();