fune/servo/components/net
Raghav ebf6723fe2 servo: Merge #14794 - Refactor HSTSList to use HashMap (from mrnayak:hsts-refactor); r=emilio
Refactored HSTSList to use HashMap, where the key of HashMap is the base domain. Every time when we check if a host is secure, we find the base domain of the host and get a vector of HSTS entries associated with the base domain.

While this will not give O(1) look up time, we would have a smaller list to iterate for every lookup. I have added one unit test to validate `HashMap` changes.

<!-- Please describe your changes on the following line: -->

---
<!-- 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 #14756

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

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

Source-Repo: https://github.com/servo/servo
Source-Revision: b06f4aec67ff93b1d667a5817084b0952e56664e
2016-12-30 10:33:40 -08:00
..
fetch servo: Merge #14716 - Implement HSTS fetch step (from mrnayak:hsts); r=jdm 2016-12-29 00:35:09 -08:00
blob_loader.rs servo: Merge #14360 - Remove the legacy networking stack (from servo:fetch); r=nox 2016-11-24 03:20:05 -08:00
Cargo.toml servo: Merge #14592 - Remove the util crate (from asajeffrey:util-goodbye); r=mbrubeck 2016-12-14 16:48:42 -08:00
chrome_loader.rs servo: Merge #14592 - Remove the util crate (from asajeffrey:util-goodbye); r=mbrubeck 2016-12-14 16:48:42 -08:00
connector.rs servo: Merge #14716 - Implement HSTS fetch step (from mrnayak:hsts); r=jdm 2016-12-29 00:35:09 -08:00
content_blocker.rs servo: Merge #14592 - Remove the util crate (from asajeffrey:util-goodbye); r=mbrubeck 2016-12-14 16:48:42 -08:00
cookie.rs servo: Merge #14722 - Check for wss schemes in Cookie::appropriate_for_url (from iamrohit7:check-secure-schemes); r=jdm 2016-12-25 00:48:09 -08:00
cookie_storage.rs servo: Merge #14722 - Check for wss schemes in Cookie::appropriate_for_url (from iamrohit7:check-secure-schemes); r=jdm 2016-12-25 00:48:09 -08:00
data_loader.rs servo: Merge #14360 - Remove the legacy networking stack (from servo:fetch); r=nox 2016-11-24 03:20:05 -08:00
filemanager_thread.rs servo: Merge #14592 - Remove the util crate (from asajeffrey:util-goodbye); r=mbrubeck 2016-12-14 16:48:42 -08:00
hsts.rs servo: Merge #14794 - Refactor HSTSList to use HashMap (from mrnayak:hsts-refactor); r=emilio 2016-12-30 10:33:40 -08:00
http_loader.rs servo: Merge #14716 - Implement HSTS fetch step (from mrnayak:hsts); r=jdm 2016-12-29 00:35:09 -08:00
image_cache_thread.rs servo: Merge #14644 - Ever so slightly less unstable (from servo:ever-so-slightly-less-unstable); r=heycam 2016-12-19 22:09:02 -08:00
lib.rs servo: Merge #14592 - Remove the util crate (from asajeffrey:util-goodbye); r=mbrubeck 2016-12-14 16:48:42 -08:00
mime_classifier.rs servo: Merge #13411 - Migrate mime_classifier top-level string to enum (from frewsxcv:mime); r=jdm 2016-10-08 15:40:47 -05:00
resource_thread.rs servo: Merge #14716 - Implement HSTS fetch step (from mrnayak:hsts); r=jdm 2016-12-29 00:35:09 -08:00
storage_thread.rs servo: Merge #14592 - Remove the util crate (from asajeffrey:util-goodbye); r=mbrubeck 2016-12-14 16:48:42 -08:00
websocket_loader.rs servo: Merge #14592 - Remove the util crate (from asajeffrey:util-goodbye); r=mbrubeck 2016-12-14 16:48:42 -08:00