Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
khws4v1
mastodon.ef67daisuki.club
Commits
ed544f31
Commit
ed544f31
authored
Jul 05, 2019
by
ThibG
Committed by
Eugen Rochko
Jul 05, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix HTTP requests to IPv6 hosts (#11240)
parent
0c1b1069
Pipeline
#9
failed with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
app/lib/request.rb
app/lib/request.rb
+1
-1
No files found.
app/lib/request.rb
View file @
ed544f31
...
...
@@ -191,7 +191,7 @@ class Request
begin
raise
Mastodon
::
HostValidationError
if
PrivateAddressCheck
.
private_address?
(
IPAddr
.
new
(
address
.
to_s
))
sock
=
::
Socket
.
new
(
::
Socket
::
AF_INET
,
::
Socket
::
SOCK_STREAM
,
0
)
sock
=
::
Socket
.
new
(
address
.
is_a?
(
Resolv
::
IPv6
)
?
::
Socket
::
AF_INET6
:
::
Socket
::
AF_INET
,
::
Socket
::
SOCK_STREAM
,
0
)
sockaddr
=
::
Socket
.
pack_sockaddr_in
(
port
,
address
.
to_s
)
sock
.
setsockopt
(
::
Socket
::
IPPROTO_TCP
,
::
Socket
::
TCP_NODELAY
,
1
)
...
...
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