Auto merge of #10867 - danlrobertson:sandbox, r=KiChjang

Fix logic for cors cache match

The current logic for a cors cache match does not consider "credentials is false and request's credentials mode is not "include" or credentials is true."

I could have missed something, but `CacheRequestDetails::credentials` is set to true if credentials mode is "include", and false otherwise. So `(!cors_cache.credentials && !cors_req.credentials) || cors_cache.credentials` would be directly following the spec, but unless I'm mistaken `cors_cache.credentials || !cors_req.credentials` is logically the same.

Fixes: #10525

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10867)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-04-28 13:36:05 -07:00
commit 3d38a60cee
4 changed files with 119 additions and 214 deletions

View file

@ -33,7 +33,7 @@ pub enum Destination {
}
/// A request [origin](https://fetch.spec.whatwg.org/#concept-request-origin)
#[derive(Clone, PartialEq)]
#[derive(Clone, PartialEq, Debug)]
pub enum Origin {
Client,
Origin(UrlOrigin)