/
opt
/
canhelp
/
node_modules
/
next
/
dist
/
server
/
web
/
/opt/canhelp/node_modules/next/dist/server/web
mkdir
upload
Name
Size
Mode
Actions
exports/
-
0755
rm
sandbox/
-
0755
rm
spec-extension/
-
0755
rm
adapter.d.ts
1021
0644
edit
dl
rm
adapter.js
18574
0644
edit
dl
rm
adapter.js.map
28406
0644
edit
dl
rm
edge-route-module-wrapper.d.ts
1367
0644
edit
dl
rm
edge-route-module-wrapper.js
5184
0644
edit
dl
rm
edge-route-module-wrapper.js.map
8522
0644
edit
dl
rm
error.d.ts
264
0644
edit
dl
rm
error.js
1423
0644
edit
dl
rm
error.js.map
1396
0644
edit
dl
rm
get-edge-preview-props.d.ts
387
0644
edit
dl
rm
get-edge-preview-props.js
802
0644
edit
dl
rm
get-edge-preview-props.js.map
1067
0644
edit
dl
rm
globals.d.ts
402
0644
edit
dl
rm
globals.js
4830
0644
edit
dl
rm
globals.js.map
6158
0644
edit
dl
rm
http.d.ts
674
0644
edit
dl
rm
http.js
795
0644
edit
dl
rm
http.js.map
1124
0644
edit
dl
rm
internal-edge-wait-until.d.ts
156
0644
edit
dl
rm
internal-edge-wait-until.js
2172
0644
edit
dl
rm
internal-edge-wait-until.js.map
2932
0644
edit
dl
rm
next-url.d.ts
1752
0644
edit
dl
rm
next-url.js
7440
0644
edit
dl
rm
next-url.js.map
13248
0644
edit
dl
rm
types.d.ts
1941
0644
edit
dl
rm
types.js
115
0644
edit
dl
rm
types.js.map
67
0644
edit
dl
rm
utils.d.ts
1249
0644
edit
dl
rm
utils.js
4914
0644
edit
dl
rm
utils.js.map
8365
0644
edit
dl
rm
web-on-close.d.ts
542
0644
edit
dl
rm
web-on-close.js
2785
0644
edit
dl
rm
web-on-close.js.map
3406
0644
edit
dl
rm
Edit:
/opt/canhelp/node_modules/next/dist/server/web/utils.js
(4914B)
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { fromNodeOutgoingHttpHeaders: null, normalizeNextQueryParam: null, splitCookiesString: null, toNodeOutgoingHttpHeaders: null, validateURL: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { fromNodeOutgoingHttpHeaders: function() { return fromNodeOutgoingHttpHeaders; }, normalizeNextQueryParam: function() { return normalizeNextQueryParam; }, splitCookiesString: function() { return splitCookiesString; }, toNodeOutgoingHttpHeaders: function() { return toNodeOutgoingHttpHeaders; }, validateURL: function() { return validateURL; } }); const _constants = require("../../lib/constants"); function fromNodeOutgoingHttpHeaders(nodeHeaders) { const headers = new Headers(); for (let [key, value] of Object.entries(nodeHeaders)){ const values = Array.isArray(value) ? value : [ value ]; for (let v of values){ if (typeof v === 'undefined') continue; if (typeof v === 'number') { v = v.toString(); } headers.append(key, v); } } return headers; } function splitCookiesString(cookiesString) { var cookiesStrings = []; var pos = 0; var start; var ch; var lastComma; var nextStart; var cookiesSeparatorFound; function skipWhitespace() { while(pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))){ pos += 1; } return pos < cookiesString.length; } function notSpecialChar() { ch = cookiesString.charAt(pos); return ch !== '=' && ch !== ';' && ch !== ','; } while(pos < cookiesString.length){ start = pos; cookiesSeparatorFound = false; while(skipWhitespace()){ ch = cookiesString.charAt(pos); if (ch === ',') { // ',' is a cookie separator if we have later first '=', not ';' or ',' lastComma = pos; pos += 1; skipWhitespace(); nextStart = pos; while(pos < cookiesString.length && notSpecialChar()){ pos += 1; } // currently special character if (pos < cookiesString.length && cookiesString.charAt(pos) === '=') { // we found cookies separator cookiesSeparatorFound = true; // pos is inside the next cookie, so back up and return it. pos = nextStart; cookiesStrings.push(cookiesString.substring(start, lastComma)); start = pos; } else { // in param ',' or param separator ';', // we continue from that comma pos = lastComma + 1; } } else { pos += 1; } } if (!cookiesSeparatorFound || pos >= cookiesString.length) { cookiesStrings.push(cookiesString.substring(start, cookiesString.length)); } } return cookiesStrings; } function toNodeOutgoingHttpHeaders(headers) { const nodeHeaders = {}; const cookies = []; if (headers) { for (const [key, value] of headers.entries()){ if (key.toLowerCase() === 'set-cookie') { // We may have gotten a comma joined string of cookies, or multiple // set-cookie headers. We need to merge them into one header array // to represent all the cookies. cookies.push(...splitCookiesString(value)); nodeHeaders[key] = cookies.length === 1 ? cookies[0] : cookies; } else { nodeHeaders[key] = value; } } } return nodeHeaders; } function validateURL(url) { try { return String(new URL(String(url))); } catch (error) { throw Object.defineProperty(new Error(`URL is malformed "${String(url)}". Please use only absolute URLs - https://nextjs.org/docs/messages/middleware-relative-urls`, { cause: error }), "__NEXT_ERROR_CODE", { value: "E61", enumerable: false, configurable: true }); } } function normalizeNextQueryParam(key) { const prefixes = [ _constants.NEXT_QUERY_PARAM_PREFIX, _constants.NEXT_INTERCEPTION_MARKER_PREFIX ]; for (const prefix of prefixes){ if (key !== prefix && key.startsWith(prefix)) { return key.substring(prefix.length); } } return null; } //# sourceMappingURL=utils.js.map
Save
cmd:
run