Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
c7765c4498
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
12
src/index.js
12
src/index.js
|
@ -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
|
||||
|
|
|
@ -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
|
||||
});
|
||||
|
||||
}
|
||||
|
|
461
test/test.js
461
test/test.js
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue