Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
open-source
Proxy
Commits
8f5f29e9
Commit
8f5f29e9
authored
Mar 05, 2021
by
Dominik Hebeler
Browse files
added message when host couldn't be found
parent
a0478b28
Changes
3
Hide whitespace changes
Inline
Side-by-side
app/Console/Commands/RequestFetcher.php
View file @
8f5f29e9
...
...
@@ -177,7 +177,7 @@ class RequestFetcher extends Command
private
function
parseResponse
(
$ch
)
{
$errorNumber
=
curl_errno
(
$ch
);
if
(
$errorNumber
===
CURLE_ABORTED_BY_CALLBACK
)
{
if
(
$errorNumber
)
{
return
[
"error"
=>
$errorNumber
,
"message"
=>
curl_error
(
$ch
),
...
...
app/Http/Controllers/ProxyController.php
View file @
8f5f29e9
...
...
@@ -182,6 +182,8 @@ class ProxyController extends Controller
"validuntil"
=>
$postData
[
"valid-until"
],
"password"
=>
$postData
[
"password"
]
]),
413
);
}
else
if
(
$answer
[
"error"
]
===
CURLE_COULDNT_RESOLVE_HOST
){
return
view
(
'curl_errors.6'
,
[
"answer"
=>
$answer
]);
}
}
...
...
resources/views/curl_errors/6.blade.php
0 → 100644
View file @
8f5f29e9
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<title>
Unknown Host
</title>
<style>
body
>
div
:nth-child
(
1
)
{
max-width
:
700px
;
}
body
{
display
:
flex
;
justify-content
:
center
;
padding-top
:
30vh
;
}
body
>
div
>
a
{
border
:
1px
solid
#fbcd79
;
max-width
:
200px
;
padding
:
4px
8px
;
text-align
:
center
;
color
:
inherit
;
text-decoration
:
none
;
border-radius
:
5px
;
background-color
:
orange
;
color
:
white
;
}
</style>
</head>
<body>
<div>
<p>
{{$answer["message"]}}
</p>
</div>
</body>
</html>
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment