Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
caddy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
caddy
Commits
d8be787f
Commit
d8be787f
authored
Jan 28, 2016
by
MathiasB
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FastCGI: IPv6 when parsing r.RemoteAddr
parent
a8c8b483
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
middleware/fastcgi/fastcgi.go
middleware/fastcgi/fastcgi.go
+1
-1
No files found.
middleware/fastcgi/fastcgi.go
View file @
d8be787f
...
@@ -182,7 +182,7 @@ func (h Handler) buildEnv(r *http.Request, rule Rule, fpath string) (map[string]
...
@@ -182,7 +182,7 @@ func (h Handler) buildEnv(r *http.Request, rule Rule, fpath string) (map[string]
// Separate remote IP and port; more lenient than net.SplitHostPort
// Separate remote IP and port; more lenient than net.SplitHostPort
var
ip
,
port
string
var
ip
,
port
string
if
idx
:=
strings
.
Index
(
r
.
RemoteAddr
,
":"
);
idx
>
-
1
{
if
idx
:=
strings
.
Last
Index
(
r
.
RemoteAddr
,
":"
);
idx
>
-
1
{
ip
=
r
.
RemoteAddr
[
:
idx
]
ip
=
r
.
RemoteAddr
[
:
idx
]
port
=
r
.
RemoteAddr
[
idx
+
1
:
]
port
=
r
.
RemoteAddr
[
idx
+
1
:
]
}
else
{
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment