Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
gab-social
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
gab
social
gab-social
Commits
32b04999
Commit
32b04999
authored
Aug 26, 2019
by
mgabdev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed head request in FetchLinkCardService
parent
e6f9b0d4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
6 deletions
+0
-6
app/services/fetch_link_card_service.rb
app/services/fetch_link_card_service.rb
+0
-6
No files found.
app/services/fetch_link_card_service.rb
View file @
32b04999
...
...
@@ -39,12 +39,6 @@ class FetchLinkCardService < BaseService
def
process_url
@card
||=
PreviewCard
.
new
(
url:
@url
)
failed
=
Request
.
new
(
:head
,
@url
).
perform
do
|
res
|
res
.
code
!=
405
&&
res
.
code
!=
501
&&
(
res
.
code
!=
200
||
res
.
mime_type
!=
'text/html'
)
end
return
if
failed
Request
.
new
(
:get
,
@url
).
perform
do
|
res
|
if
res
.
code
==
200
&&
res
.
mime_type
==
'text/html'
@html
=
res
.
body_with_limit
...
...
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