Skip to content

Commit

Permalink
Merge aceed32 into 8859a0f
Browse files Browse the repository at this point in the history
  • Loading branch information
lukechilds committed Dec 20, 2016
2 parents 8859a0f + aceed32 commit 17544c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ function asPromise(opts) {
}
}

if (statusCode < 200 || statusCode > limitStatusCode) {
if (statusCode !== 304 && (statusCode < 200 || statusCode > limitStatusCode)) {
throw new got.HTTPError(statusCode, opts);
}

Expand Down Expand Up @@ -185,7 +185,7 @@ function asStream(opts) {

res.pipe(output);

if (statusCode < 200 || statusCode > 299) {
if (statusCode !== 304 && (statusCode < 200 || statusCode > 299)) {
proxy.emit('error', new got.HTTPError(statusCode, opts), null, res);
return;
}
Expand Down

0 comments on commit 17544c3

Please sign in to comment.