Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix port not being reset on redirect #729

Merged
merged 2 commits into from Feb 19, 2019

Conversation

szmarczak
Copy link
Collaborator

Fixes #719

@szmarczak
Copy link
Collaborator Author

Why does Travis need port 80? 🤔

@sindresorhus
Copy link
Owner

If you need web server to be listening on port 80, remember to use sudo (Linux will not allow non-privileged process to bind to port 80). For ports greater than 1024, using sudo is not necessary (and not recommended).
- https://docs.travis-ci.com/user/gui-and-headless-browsers/#starting-a-web-server

test/redirects.js Outdated Show resolved Hide resolved
@szmarczak
Copy link
Collaborator Author

If you need web server to be listening on port 80, remember to use sudo (Linux will not allow non-privileged process to bind to port 80). For ports greater than 1024, using sudo is not necessary (and not recommended).

So I guess it should be sudo nyc ava?

@sindresorhus
Copy link
Owner

Can't you pick a different port than 80?

@sindresorhus
Copy link
Owner

So I guess it should be sudo nyc ava?

Then we would have to have sudo enabled on Travis too, which means we couldn't use their fast Docker images, which would make Travis much slower...

@szmarczak
Copy link
Collaborator Author

Can't you pick a different port than 80?

Yeah, I can. 443. The port has to be default one.

Or... we could check the error if there's nothing listening on 80...

@szmarczak
Copy link
Collaborator Author

Then we would have to have sudo enabled on Travis too, which means we couldn't use their fast Docker images, which would make Travis much slower...

IMO using sudo shouldn't affect the performance... But I believe you're right :)

@sindresorhus
Copy link
Owner

IMO using sudo shouldn't affect the performance...

It's not "using sudo" that makes it slow. It's just that the Docker images on Travis don't support sudo, so when you enable sudo support there it will use the old non-Docker images, which are slower.

@szmarczak
Copy link
Collaborator Author

when you enable sudo support there it will use the old non-Docker images, which are slower.

Thanks for explaination, makes sense.

@szmarczak
Copy link
Collaborator Author

We could also use nock there...

@sindresorhus
Copy link
Owner

If 443 works, I would prefer that. Otherwise, nock is ok.

@szmarczak
Copy link
Collaborator Author

If 443 works, I would prefer that.

But 443 is below 1080, so it won't work.

Otherwise, nock is ok.

Ok, I'll do it :)

@sindresorhus sindresorhus merged commit ada5861 into sindresorhus:master Feb 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants