Skip to content

Commit

Permalink
Adjusts URL detection to be case insensitive
Browse files Browse the repository at this point in the history
Per [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3.1), the URL schema (e.g., http:, https:) should be case insensitive. This PR adjusts the URL detection regex to ensure that capitalized schemas (e.g., HTTP, HTTPS) are supported.
  • Loading branch information
Ken Beck authored Jul 11, 2019
1 parent 2e701d5 commit 0c75e17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wsdl/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1169,7 +1169,7 @@ export class WSDL {
}

let includePath: string;
if (!/^https?:/.test(this.uri) && !/^https?:/.test(include.location)) {
if (!/^https?:/i.test(this.uri) && !/^https?:/i.test(include.location)) {
includePath = path.resolve(path.dirname(this.uri), include.location);
} else {
includePath = url.resolve(this.uri || '', include.location);
Expand Down

0 comments on commit 0c75e17

Please # to comment.