Permalink
Cannot retrieve contributors at this time
executable file
28 lines (28 sloc)
959 Bytes
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
codeql-action/node_modules/uri-js/dist/esnext/schemes/http.js
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const handler = { | |
scheme: "http", | |
domainHost: true, | |
parse: function (components, options) { | |
//report missing host | |
if (!components.host) { | |
components.error = components.error || "HTTP URIs must have a host."; | |
} | |
return components; | |
}, | |
serialize: function (components, options) { | |
const secure = String(components.scheme).toLowerCase() === "https"; | |
//normalize the default port | |
if (components.port === (secure ? 443 : 80) || components.port === "") { | |
components.port = undefined; | |
} | |
//normalize the empty path | |
if (!components.path) { | |
components.path = "/"; | |
} | |
//NOTE: We do not parse query strings for HTTP URIs | |
//as WWW Form Url Encoded query strings are part of the HTML4+ spec, | |
//and not the HTTP spec. | |
return components; | |
} | |
}; | |
export default handler; | |
//# sourceMappingURL=http.js.map |