Skip to content

Issue path validation #534

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

Merged
merged 3 commits into from
Oct 17, 2016
Merged

Conversation

fatelei
Copy link
Contributor

@fatelei fatelei commented Jul 23, 2015

When a client visits a server with a wrong path, the connection should be rejected.

@JoshuaWise
Copy link
Member

I second the importance of this change.

@fatelei
Copy link
Contributor Author

fatelei commented Jul 25, 2015

The old way: If the client connects with a wrong path, the connection will hang. Both the server and the client can know what hanppened. I think the server should tell to the client what happened.

@@ -2081,7 +2081,11 @@ describe('WebSocket', function() {
});
ws.on('close', function() {
setTimeout(function() {
assert.ok(errorGiven);
if (errorGiven) {
Copy link
Member

@lpinca lpinca Oct 17, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't get this change. The assertion is useless now as it's always true.

@lpinca
Copy link
Member

lpinca commented Oct 17, 2016

Can you please add a test for this? Thank you.

@fatelei
Copy link
Contributor Author

fatelei commented Oct 17, 2016

ok

fate added 2 commits October 17, 2016 21:23
When a client visits a server with a wrong path, the connection should be rejected.
@fatelei fatelei force-pushed the issue-path-validation branch from c2071c9 to 52f0b33 Compare October 17, 2016 13:37
@fatelei fatelei force-pushed the issue-path-validation branch from 52f0b33 to 98af262 Compare October 17, 2016 13:51
@fatelei
Copy link
Contributor Author

fatelei commented Oct 17, 2016

@lpinca I have added a test

@lpinca
Copy link
Member

lpinca commented Oct 17, 2016

@fatelei thank you. LGTM.

@lpinca lpinca merged commit 8c5476f into websockets:master Oct 17, 2016
@lpinca lpinca mentioned this pull request Dec 12, 2016
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.

3 participants