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

Let EventSource fail fast on bad schemes #25695

Merged
merged 1 commit into from Feb 11, 2020
Merged

Conversation

@pshaughn
Copy link
Member

pshaughn commented Feb 5, 2020

EventSource went into an infinite reconnect loop in some cases where tests wanted it to go into a hard error state; this addresses the cases where that happens because the url isn't even http(s) and will thus definitely never result in an event stream.

web-platform-tests/wpt#4311 suggests the tests might just be too picky here; the spec does use the word "may" on relevant behavior.


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix #25692
  • There are tests for these changes
@highfive
Copy link

highfive commented Feb 5, 2020

Heads up! This PR modifies the following files:

@@ -472,7 +483,7 @@ impl EventSource {
let event_source = event_source.root();
if event_source.ready_state.get() != ReadyState::Closed {
event_source.ready_state.set(ReadyState::Closed);
event_source.upcast::<EventTarget>().fire_event(atom!("error"));
event_source.upcast::<EventTarget>().fire_event(atom!("error"));

This comment has been minimized.

Copy link
@CYBAI

CYBAI Feb 6, 2020

Collaborator

Heh, I'm surprised fmt didn't complain about this 🤔 looks like we should keep it with original indentation 👀?

This comment has been minimized.

Copy link
@pshaughn

pshaughn Feb 6, 2020

Author Member

This keeps happening to me in particular! My workflow is to just type stuff in emacs without thinking about indents, then run mach fmt afterwards.

This comment has been minimized.

Copy link
@nox

nox Feb 10, 2020

Member

Are you saying that fmt isn't complaining about this reindented line?

This comment has been minimized.

Copy link
@pshaughn

pshaughn Feb 10, 2020

Author Member

Yeah, it seems to give up when deep enough in a task! macro.

@nox
Copy link
Member

nox commented Feb 10, 2020

Seems ok to me, r=me if fmt is happy.

@bors-servo delegate+

@bors-servo
Copy link
Contributor

bors-servo commented Feb 10, 2020

✌️ @pshaughn can now approve this pull request

@jdm
Copy link
Member

jdm commented Feb 10, 2020

@bors-servo r=nox

@bors-servo
Copy link
Contributor

bors-servo commented Feb 10, 2020

📌 Commit be039f0 has been approved by nox

@pshaughn
Copy link
Member Author

pshaughn commented Feb 10, 2020

hold on, I didn't fix the indentation yet

@pshaughn
Copy link
Member Author

pshaughn commented Feb 10, 2020

@pshaughn pshaughn force-pushed the pshaughn:eventsource branch from be039f0 to 7ef644c Feb 10, 2020
@jdm
Copy link
Member

jdm commented Feb 10, 2020

@bors-servo r=nox

@bors-servo
Copy link
Contributor

bors-servo commented Feb 10, 2020

📌 Commit 7ef644c has been approved by nox

@bors-servo
Copy link
Contributor

bors-servo commented Feb 10, 2020

Testing commit 7ef644c with merge 1527fcf...

bors-servo added a commit that referenced this pull request Feb 10, 2020
Let EventSource fail fast on bad schemes

<!-- Please describe your changes on the following line: -->
EventSource went into an infinite reconnect loop in some cases where tests wanted it to go into a hard error state; this addresses the cases where that happens because the url isn't even http(s) and will thus definitely never result in an event stream.

web-platform-tests/wpt#4311 suggests the tests might just be too picky here; the spec does use the word "may" on relevant behavior.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #25692

<!-- Either: -->
- [X] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
@bors-servo
Copy link
Contributor

bors-servo commented Feb 10, 2020

💔 Test failed - status-taskcluster

@pshaughn
Copy link
Member Author

pshaughn commented Feb 11, 2020

@bors-servo
Copy link
Contributor

bors-servo commented Feb 11, 2020

Testing commit 7ef644c with merge ff6c672...

bors-servo added a commit that referenced this pull request Feb 11, 2020
Let EventSource fail fast on bad schemes

<!-- Please describe your changes on the following line: -->
EventSource went into an infinite reconnect loop in some cases where tests wanted it to go into a hard error state; this addresses the cases where that happens because the url isn't even http(s) and will thus definitely never result in an event stream.

web-platform-tests/wpt#4311 suggests the tests might just be too picky here; the spec does use the word "may" on relevant behavior.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #25692

<!-- Either: -->
- [X] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
@bors-servo
Copy link
Contributor

bors-servo commented Feb 11, 2020

💔 Test failed - status-taskcluster

@pshaughn
Copy link
Member Author

pshaughn commented Feb 11, 2020

@bors-servo retry
more of the same

bors-servo added a commit that referenced this pull request Feb 11, 2020
Let EventSource fail fast on bad schemes

<!-- Please describe your changes on the following line: -->
EventSource went into an infinite reconnect loop in some cases where tests wanted it to go into a hard error state; this addresses the cases where that happens because the url isn't even http(s) and will thus definitely never result in an event stream.

web-platform-tests/wpt#4311 suggests the tests might just be too picky here; the spec does use the word "may" on relevant behavior.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #25692

<!-- Either: -->
- [X] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
@bors-servo
Copy link
Contributor

bors-servo commented Feb 11, 2020

Testing commit 7ef644c with merge 7b54094...

@bors-servo
Copy link
Contributor

bors-servo commented Feb 11, 2020

☀️ Test successful - status-taskcluster
Approved by: nox
Pushing 7b54094 to master...

@bors-servo bors-servo merged commit 7ef644c into servo:master Feb 11, 2020
2 checks passed
2 checks passed
Community-TC (pull_request) TaskGroup: success
Details
homu Test successful
Details
@bors-servo bors-servo mentioned this pull request Feb 11, 2020
4 of 4 tasks complete
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.

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