Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
d802a7c9
Commit
d802a7c9
authored
4 years ago
by
echicken
Browse files
Options
Downloads
Patches
Plain Diff
Sub in original
scheme://host[:port]
if absent from Location on redirect.
parent
8b8ed215
No related branches found
No related tags found
1 merge request
!463
MRC mods by Codefenix (2024-10-20)
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
exec/load/http.js
+4
-1
4 additions, 1 deletion
exec/load/http.js
with
4 additions
and
1 deletion
exec/load/http.js
+
4
−
1
View file @
d802a7c9
...
...
@@ -220,7 +220,10 @@ HTTPRequest.prototype.Get=function(url, referer, base) {
&&
this
.
response_headers_parsed
.
Location
.
length
)
{
this
.
follow_redirects
--
;
return
this
.
Get
(
this
.
response_headers_parsed
.
Location
[
0
],
url
);
// To-do: be less tired and think about referer,base
const
re
=
/
([
a-z
]
+:
\/\/
.+:
{0,1}\d{0,5})\/
/i
;
var
loc
=
this
.
response_headers_parsed
.
Location
[
0
];
if
(
loc
.
search
(
re
)
<
0
)
loc
=
url
.
match
(
re
)[
1
]
+
loc
;
// Assumes 'url' will match 're', but if it doesn't you'll have other problems anyway
return
this
.
Get
(
loc
,
url
);
// To-do: be less tired and think about referer,base
}
return
(
this
.
body
);
};
...
...
This diff is collapsed.
Click to expand it.
echicken
@echicken
mentioned in issue
#204 (closed)
·
4 years ago
mentioned in issue
#204 (closed)
mentioned in issue #204
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment