1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 #ifndef HttpAuthUtils_h__ 6 #define HttpAuthUtils_h__ 7 8 class nsIURI; 9 10 namespace mozilla { 11 namespace net { 12 namespace auth { 13 14 /* Tries to match the given URI against the value of a given pref 15 * 16 * The pref should be in pseudo-BNF format. 17 * url-list base-url ( base-url "," LWS )* 18 * base-url ( scheme-part | host-part | scheme-part host-part ) 19 * scheme-part scheme "://" 20 * host-part host [":" port] 21 * 22 * for example: 23 * "https://, http://office.foo.com" 24 * 25 * Will return true if the URI matches any of the patterns, or false otherwise. 26 */ 27 bool URIMatchesPrefPattern(nsIURI *uri, const char *pref); 28 29 } // namespace auth 30 } // namespace net 31 } // namespace mozilla 32 33 #endif // HttpAuthUtils_h__ 34