fix: could not read service folders/files that had urlescape'd characters in them
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -363,3 +363,4 @@ MigrationBackup/
|
|||||||
FodyWeavers.xsd
|
FodyWeavers.xsd
|
||||||
/hacktv_updsrv/ServiceLogPost/1626307222_warning_812bf30600b002bb
|
/hacktv_updsrv/ServiceLogPost/1626307222_warning_812bf30600b002bb
|
||||||
/hacktv_updsrv/ServiceVault/wtv-music/midi
|
/hacktv_updsrv/ServiceVault/wtv-music/midi
|
||||||
|
/zefie_wtvp_minisrv/ServiceVault/wtv-home/6969.html
|
||||||
|
|||||||
@@ -238,7 +238,7 @@ async function processURL(socket, request_headers) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
shortURL = request_headers.request_url;
|
shortURL = unescape(request_headers.request_url);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (shortURL.indexOf(':/') >= 0 && shortURL.indexOf('://') < 0) {
|
if (shortURL.indexOf(':/') >= 0 && shortURL.indexOf('://') < 0) {
|
||||||
@@ -277,7 +277,7 @@ async function processURL(socket, request_headers) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function doHTTPProxy(socket, request_headers) {
|
async function doHTTPProxy(socket, request_headers) {
|
||||||
if (zshowheaders) console.log("HTTP Proxy: Client Request Headers on socket ID", socket.id, (await processSSID(request_headers));
|
if (zshowheaders) console.log("HTTP Proxy: Client Request Headers on socket ID", socket.id, (await processSSID(request_headers)));
|
||||||
var request_type = request_headers.request.indexOf('https://') ? 'http' : 'https'
|
var request_type = request_headers.request.indexOf('https://') ? 'http' : 'https'
|
||||||
switch (request_type) {
|
switch (request_type) {
|
||||||
case "https":
|
case "https":
|
||||||
@@ -459,7 +459,7 @@ async function sendToClient(socket, headers_obj, data) {
|
|||||||
|
|
||||||
|
|
||||||
// header object to string
|
// header object to string
|
||||||
if (zshowheaders) console.log(" * Outgoing headers on socket ID", socket.id, (await processSSID(headers_obj));
|
if (zshowheaders) console.log(" * Outgoing headers on socket ID", socket.id, (await processSSID(headers_obj)));
|
||||||
Object.keys(headers_obj).forEach(function (k) {
|
Object.keys(headers_obj).forEach(function (k) {
|
||||||
if (k == "http_response") {
|
if (k == "http_response") {
|
||||||
headers += headers_obj[k] + "\r\n";
|
headers += headers_obj[k] + "\r\n";
|
||||||
|
|||||||
Reference in New Issue
Block a user