Sha256: 1c53a347a23c5a535fb9971bc89936d11a444a8e3ddf5e5749b2ef5f3f741220
Contents?: true
Size: 954 Bytes
Versions: 91
Compression:
Stored size: 954 Bytes
Contents
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) { //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; //# sourceMappingURL=http.js.map
Version data entries
91 entries across 91 versions & 11 rubygems