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
return convert(
buffer
, 'UTF-8'
, charset
buffer,
'UTF-8',
charset
).toString();
}

View File

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

View File

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

File diff suppressed because it is too large Load Diff