node 0.10 need the status code fallback

This commit is contained in:
David Frank 2016-03-19 18:41:11 +08:00
parent 827ce8fa31
commit 42d822273f
1 changed files with 1 additions and 1 deletions

View File

@ -22,7 +22,7 @@ function Response(body, opts) {
this.url = opts.url;
this.status = opts.status;
this.statusText = opts.statusText;
this.statusText = opts.statusText || http.STATUS_CODES[this.status];
this.headers = new Headers(opts.headers);
this.ok = this.status >= 200 && this.status < 300;