private void NullOrEmpty(ConcreteDomainPolicy.Headers h) { Assert.IsFalse(h.AllowAllHeaders, "AllowAllHeaders"); Assert.IsTrue(h.IsAllowed(HeadersContentType), "Content-Type"); Assert.IsTrue(h.IsAllowed(HeadersContentTypeUp), "CONTENT-TYPE"); Assert.IsTrue(h.IsAllowed(HeadersContentTypeLow), "content-type"); Assert.IsFalse(h.IsAllowed(HeadersSOAPAction1), "SOAPAction"); Assert.IsFalse(h.IsAllowed(HeadersSOAPAction2), "Content-Type, SOAPAction"); Assert.IsFalse(h.IsAllowed(HeadersSOAPAction3), "SOAPActionX"); Assert.IsFalse(h.IsAllowed(FlashHeaders1), "x-flash-version"); Assert.IsFalse(h.IsAllowed(FlashHeaders2), "X-Permitted-Cross-Domain-Policies"); }
public void Headers_AllowAll() { ConcreteDomainPolicy.Headers h = Parse("*"); Assert.IsTrue(h.AllowAllHeaders, "AllowAllHeaders"); Assert.IsTrue(h.IsAllowed(HeadersContentType), "Content-Type"); Assert.IsTrue(h.IsAllowed(HeadersContentTypeUp), "CONTENT-TYPE"); Assert.IsTrue(h.IsAllowed(HeadersContentTypeLow), "content-type"); Assert.IsTrue(h.IsAllowed(HeadersSOAPAction1), "SOAPAction"); Assert.IsTrue(h.IsAllowed(HeadersSOAPAction2), "Content-Type, SOAPAction"); Assert.IsTrue(h.IsAllowed(HeadersSOAPAction3), "SOAPActionX"); Assert.IsTrue(h.IsAllowed(FlashHeaders1), "x-flash-version"); Assert.IsTrue(h.IsAllowed(FlashHeaders2), "X-Permitted-Cross-Domain-Policies"); }