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

Move error handling out of the network loader #8678

Closed
jdm opened this issue Nov 25, 2015 · 1 comment
Closed

Move error handling out of the network loader #8678

jdm opened this issue Nov 25, 2015 · 1 comment
Assignees
Labels
A-network C-assigned There is someone working on resolving the issue I-refactor No impact; the issue is one of maintainability or tidiness. Proposed solution requires refactoring. I-wrong An incorrect behaviour is observed.

Comments

@jdm
Copy link
Member

jdm commented Nov 25, 2015

There are a couple steps here:

  • replace the free-form string in the Result that network listeners receive with the LoadError type from http_loader.rs
  • propagate the errors from load_for_consumer to the network receiver instead of sending a string
  • convert the other network loaders to use the LoadError values
  • move the SSL validation error handling into the HTML parser network listener (servohtmlparser.rs)
  • make headers_available take a Result<Metadata, LoadError> value to reflect the possibility of early errors (such as SSL validation failure)
@jdm jdm added the A-network label Nov 25, 2015
@jdm
Copy link
Member Author

jdm commented Nov 25, 2015

This will both fix problems like <script src="http://some_invalid_ssl.com"> causing our error page to be interpreted as JS, and allow us to handle DNS failure properly in the HTML parser network listener (while other consumers will just see an early error).

@jdm jdm added I-wrong An incorrect behaviour is observed. I-refactor No impact; the issue is one of maintainability or tidiness. Proposed solution requires refactoring. C-assigned There is someone working on resolving the issue labels Nov 25, 2015
@wafflespeanut wafflespeanut self-assigned this Nov 25, 2015
bors-servo pushed a commit that referenced this issue Apr 20, 2016
Moving the error handling out of network loader

Rebase of #8851. Fixes #8678. Fixes #9944.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9942)
<!-- Reviewable:end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-network C-assigned There is someone working on resolving the issue I-refactor No impact; the issue is one of maintainability or tidiness. Proposed solution requires refactoring. I-wrong An incorrect behaviour is observed.
Projects
None yet
Development

No branches or pull requests

2 participants