mirror of
https://code.forgejo.org/actions/setup-node.git
synced 2025-06-18 09:31:11 +00:00
.
This commit is contained in:
parent
beb1329f9f
commit
2b95e76931
7736 changed files with 1874747 additions and 51184 deletions
36
node_modules/uri-js/src/schemes/http.ts
generated
vendored
Normal file
36
node_modules/uri-js/src/schemes/http.ts
generated
vendored
Normal file
|
@ -0,0 +1,36 @@
|
|||
import { URISchemeHandler, URIComponents, URIOptions } from "../uri";
|
||||
|
||||
const handler:URISchemeHandler = {
|
||||
scheme : "http",
|
||||
|
||||
domainHost : true,
|
||||
|
||||
parse : function (components:URIComponents, options:URIOptions):URIComponents {
|
||||
//report missing host
|
||||
if (!components.host) {
|
||||
components.error = components.error || "HTTP URIs must have a host.";
|
||||
}
|
||||
|
||||
return components;
|
||||
},
|
||||
|
||||
serialize : function (components:URIComponents, options:URIOptions):URIComponents {
|
||||
//normalize the default port
|
||||
if (components.port === (String(components.scheme).toLowerCase() !== "https" ? 80 : 443) || 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;
|
Loading…
Add table
Add a link
Reference in a new issue