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 #6379 #6532

Closed
wants to merge 2 commits into from
Closed

Fix #6379 #6532

wants to merge 2 commits into from

Conversation

@boghison
Copy link
Contributor

boghison commented Jul 2, 2015

Review on Reviewable

@hoppipolla-critic-bot
Copy link

hoppipolla-critic-bot commented Jul 2, 2015

Critic review: https://critic.hoppipolla.co.uk/r/5450

This is an external review system which you may optionally use for the code review of your pull request.

In order to help critic track your changes, please do not make in-place history rewrites (e.g. via git rebase -i or git commit --amend) when updating this pull request.

@jdm
Copy link
Member

jdm commented Jul 2, 2015

-S-awaiting-review +S-needs-code-changes

Can you run the websocket tests and see if any new failures are reported? ./mach test-wpt websockets should do the trick.


Review status: 0 of 1 files reviewed at latest revision, 1 unresolved discussion, all commit checks successful.


components/script/dom/websocket.rs, line 152 [r1] (raw file):
http://doc.servo.org/websocket/header/struct.Origin.html
request.headers.set(Origin(global.get_url().serialize()));


Comments from the review on Reviewable.io

@boghison
Copy link
Contributor Author

boghison commented Jul 3, 2015

@jdm I ran the tests (both with this commit and without it). There's a very large output and as far as I can see a lot of tests aren't passed in both cases. Is there any way to test specifically against the origin header?

@jdm
Copy link
Member

jdm commented Jul 3, 2015

You can run the specific test that @Ms2ger mentioned in the issue with ./mach test path/to/test.html. That being said, the actual failures that are reported by the harness are summarized at the end of the run. Those are tests where the output is different than expected; we have a lot of tests that do not succeed, but that is an expected failure so it doesn't get reported.

@boghison
Copy link
Contributor Author

boghison commented Jul 3, 2015

@jdm OK, I ran the specific test, but it panicked "thread 'ScriptTask PipelineId(0)' panicked at 'called Result::unwrap() on an Err value: ResponseError("Sec-WebSocket-Accept is invalid")', src/libcore/result.rs:731

@boghison
Copy link
Contributor Author

boghison commented Jul 5, 2015

Umm, excuse me, is someone going to merge this or not (it now sends the origin header, I tested it myself)

@Ms2ger
Copy link
Contributor

Ms2ger commented Jul 5, 2015

It looks like there are outstanding review comments on reviewable.

@boghison
Copy link
Contributor Author

boghison commented Jul 5, 2015

@Ms2ger Oh sorry, I didn't see the line comment, gonna change it now

@jdm
Copy link
Member

jdm commented Jul 6, 2015

@bors-servo: r+
-S-awaiting-review +S-awaiting-merge


Review status: 0 of 1 files reviewed at latest revision, all discussions resolved, all commit checks successful.


Comments from the review on Reviewable.io

@bors-servo
Copy link
Contributor

bors-servo commented Jul 6, 2015

📌 Commit 5d8ab71 has been approved by jdm

@bors-servo
Copy link
Contributor

bors-servo commented Jul 6, 2015

Testing commit 5d8ab71 with merge 54a18b5...

bors-servo pushed a commit that referenced this pull request Jul 6, 2015
Fix #6379



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6532)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Jul 6, 2015

💔 Test failed - mac1

@jdm
Copy link
Member

jdm commented Jul 6, 2015

/websockets/constructor/010.html
--------------------------------
TIMEOUT WebSockets: protocol in response but no requested protocol
TIMEOUT expected CRASH [Parent]
/websockets/constructor/011.html
--------------------------------
TIMEOUT WebSockets: protocol mismatch
TIMEOUT expected CRASH [Parent]
/websockets/constructor/012.html
--------------------------------
TIMEOUT WebSockets: no protocol in response
TIMEOUT expected CRASH [Parent]
/websockets/cookies/002.html
----------------------------
FAIL WebSockets: Set-Cookie in response
OK expected CRASH [Parent]
/websockets/cookies/004.html
----------------------------
OK expected CRASH [Parent]
/websockets/cookies/007.html
----------------------------
FAIL WebSockets: when to process set-cookie fields in ws response
OK expected CRASH [Parent]
/websockets/cookies/005.html
----------------------------
TIMEOUT WebSockets: setting HttpOnly cookies in ws response, checking ws request
TIMEOUT expected CRASH [Parent]
/websockets/opening-handshake/005.html
--------------------------------------
TIMEOUT WebSockets: proper first line
TIMEOUT expected CRASH [Parent]
@jdm jdm added S-tests-failed and removed S-awaiting-merge labels Jul 6, 2015
@SimonSapin
Copy link
Member

SimonSapin commented Jul 6, 2015

@boghison For future PRs, could you write more descriptive titles? Thanks! (“Fix #6379” alone does not say much when you don’t know from memory what #6379 is about.)

@boghison
Copy link
Contributor Author

boghison commented Jul 6, 2015

@SimonSapin Ok
@jdm I am not sure whether these errors are caused by my changes

@jdm
Copy link
Member

jdm commented Jul 6, 2015

@boghison They are all differences in the test output caused by your changes, so the test expectation files need to be updated to match them, eg. http://mxr.mozilla.org/servo/source/tests/wpt/metadata/websockets/opening-handshake/005.html.ini

@boghison
Copy link
Contributor Author

boghison commented Jul 6, 2015

@jdm I've never edited these, what do I have to do?

@boghison
Copy link
Contributor Author

boghison commented Jul 6, 2015

Actually nevermind, I just have to replace CRASH with what it prints that happened, right?

@jdm
Copy link
Member

jdm commented Jul 6, 2015

Precisely. For the tests with new FAIL/TIMEOUT output (rather than a FOO expected BLAH), you need a new entry like:

[output message goes here]
  expected: FAIL
@jdm
Copy link
Member

jdm commented Jul 6, 2015

@boghison The other option is to follow the steps at http://mxr.mozilla.org/servo/source/tests/wpt/README.md#71 and update all the expectations automatically.

@boghison
Copy link
Contributor Author

boghison commented Jul 6, 2015

@jdm I already started doing that ~5 mins ago, thanks for writing a guide (for noobs like me) :)

@bors-servo
Copy link
Contributor

bors-servo commented Jul 13, 2015

The latest upstream changes (presumably #6610) made this pull request unmergeable. Please resolve the merge conflicts.

@jdm
Copy link
Member

jdm commented Jul 13, 2015

Oh sorry, github doesn't notify us when a new push happens so I didn't see the new commit. Unfortunately there are a lot of WPT test expectations here that don't belong, so I'll try rebasing this locally.

bors-servo pushed a commit that referenced this pull request Jul 13, 2015
Add Origin header to WebSocket connections.

Closes #6532.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6611)
<!-- Reviewable:end -->
@boghison
Copy link
Contributor Author

boghison commented Jul 13, 2015

@jdm OK

bors-servo pushed a commit that referenced this pull request Jul 14, 2015
Add Origin header to WebSocket connections.

Closes #6532.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6611)
<!-- Reviewable:end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

7 participants
You can’t perform that action at this time.