Merge remote-tracking branch 'origin/master'

This commit is contained in:
Timothy Gu 2018-03-04 20:42:55 -08:00
commit c7765c4498
No known key found for this signature in database
GPG Key ID: 7FE6B095B582B0D4
4 changed files with 244 additions and 246 deletions

View File

@ -319,9 +319,9 @@ function convertBody(buffer, headers) {
// turn raw buffers into a single utf-8 buffer // turn raw buffers into a single utf-8 buffer
return convert( return convert(
buffer buffer,
, 'UTF-8' 'UTF-8',
, charset charset
).toString(); ).toString();
} }

View File

@ -135,12 +135,12 @@ export default function fetch(url, opts) {
// prepare response // prepare response
let body = res.pipe(new PassThrough()); let body = res.pipe(new PassThrough());
const response_options = { const response_options = {
url: request.url url: request.url,
, status: res.statusCode status: res.statusCode,
, statusText: res.statusMessage statusText: res.statusMessage,
, headers: headers headers: headers,
, size: request.size size: request.size,
, timeout: request.timeout timeout: request.timeout
}; };
// HTTP-network fetch step 12.1.1.3 // HTTP-network fetch step 12.1.1.3

View File

@ -62,13 +62,12 @@ export default class Response {
* @return Response * @return Response
*/ */
clone() { clone() {
return new Response(clone(this), { return new Response(clone(this), {
url: this.url url: this.url,
, status: this.status status: this.status,
, statusText: this.statusText statusText: this.statusText,
, headers: this.headers headers: this.headers,
, ok: this.ok ok: this.ok
}); });
} }

File diff suppressed because it is too large Load Diff