Skip to content

Commit

Permalink
Merge pull request #705 from cypress-io/dist-build-504
Browse files Browse the repository at this point in the history
fix: include dist rebuild for release
  • Loading branch information
jaffrepaul committed Jan 5, 2023
2 parents 520d77e + 6dd2b02 commit dc9224a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion dist/index.js
Expand Up @@ -52872,11 +52872,12 @@ function asPromise(normalizedOptions) {
request._beforeError(new types_1.RequestError(error.message, error, request));
return;
}
globalResponse = response;
if (!is_response_ok_1.isResponseOk(response)) {
request._beforeError(new types_1.HTTPError(response));
return;
}
globalResponse = response;
request.destroy();
resolve(request.options.resolveBodyOnly ? response.body : response);
});
const onError = (error) => {
Expand Down Expand Up @@ -54014,6 +54015,14 @@ class Request extends stream_1.Duplex {
const redirectUrl = new url_1.URL(redirectBuffer, url);
const redirectString = redirectUrl.toString();
decodeURI(redirectString);
// eslint-disable-next-line no-inner-declarations
function isUnixSocketURL(url) {
return url.protocol === 'unix:' || url.hostname === 'unix';
}
if (!isUnixSocketURL(url) && isUnixSocketURL(redirectUrl)) {
this._beforeError(new RequestError('Cannot redirect to UNIX socket', {}, this));
return;
}
// Redirecting to a different site, clear sensitive data.
if (redirectUrl.hostname !== url.hostname || redirectUrl.port !== url.port) {
if ('host' in options.headers) {
Expand Down

0 comments on commit dc9224a

Please sign in to comment.