Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
014a2255
Unverified
Commit
014a2255
authored
Jan 26, 2018
by
Ian Hickson
Committed by
GitHub
Jan 26, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Nicer error message for TLS errors (#14285)
Also some trivial improvements to style.
parent
671c1101
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
8 deletions
+26
-8
io.dart
packages/flutter_tools/lib/src/base/io.dart
+1
-0
net.dart
packages/flutter_tools/lib/src/base/net.dart
+12
-1
doctor.dart
packages/flutter_tools/lib/src/doctor.dart
+12
-6
services.dart
packages/flutter_tools/lib/src/services.dart
+1
-1
No files found.
packages/flutter_tools/lib/src/base/io.dart
View file @
014a2255
...
...
@@ -42,6 +42,7 @@ export 'dart:io'
// File NO! Use `file_system.dart`
// FileSystemEntity NO! Use `file_system.dart`
GZIP
,
HandshakeException
,
HttpClient
,
HttpClientRequest
,
HttpClientResponse
,
...
...
packages/flutter_tools/lib/src/base/net.dart
View file @
014a2255
...
...
@@ -37,7 +37,18 @@ Future<List<int>> _attempt(Uri url) async {
}
else
{
httpClient
=
new
HttpClient
();
}
final
HttpClientRequest
request
=
await
httpClient
.
getUrl
(
url
);
HttpClientRequest
request
;
try
{
request
=
await
httpClient
.
getUrl
(
url
);
}
on
HandshakeException
catch
(
error
)
{
printTrace
(
error
.
toString
());
throwToolExit
(
'Could not authenticate download server. You may be experiencing a man-in-the-middle attack,
\n
'
'your network may be compromised, or you may have malware installed on your computer.
\n
'
'URL:
$url
'
,
exitCode:
kNetworkProblemExitCode
,
);
}
final
HttpClientResponse
response
=
await
request
.
close
();
if
(
response
.
statusCode
!=
200
)
{
if
(
response
.
statusCode
>
0
&&
response
.
statusCode
<
500
)
{
...
...
packages/flutter_tools/lib/src/doctor.dart
View file @
014a2255
...
...
@@ -199,10 +199,13 @@ class _FlutterValidator extends DoctorValidator {
final
FlutterVersion
version
=
FlutterVersion
.
instance
;
messages
.
add
(
new
ValidationMessage
(
'Flutter version
${version.frameworkVersion}
at
${Cache.flutterRoot}
'
));
if
(
Cache
.
flutterRoot
.
contains
(
' '
))
if
(
Cache
.
flutterRoot
.
contains
(
' '
))
{
messages
.
add
(
new
ValidationMessage
.
error
(
'Flutter SDK install paths with spaces are not yet supported. (https://github.com/flutter/flutter/issues/6577)
\n
'
'Please move the SDK to a path that does not include spaces.'
));
'Flutter SDK install paths with spaces are not yet supported. '
'(https://github.com/flutter/flutter/issues/6577)
\n
'
'Please move the SDK to a path that does not include spaces.'
));
}
messages
.
add
(
new
ValidationMessage
(
'Framework revision
${version.frameworkRevisionShort}
'
'(
${version.frameworkAge}
),
${version.frameworkDate}
'
...
...
@@ -215,13 +218,16 @@ class _FlutterValidator extends DoctorValidator {
// Check that the binaries we downloaded for this platform actually run on it.
if
(!
_genSnapshotRuns
(
genSnapshotPath
))
{
messages
.
add
(
new
ValidationMessage
.
error
(
'Downloaded executables cannot execute '
'on host (see https://github.com/flutter/flutter/issues/6207 for more information)'
));
messages
.
add
(
new
ValidationMessage
.
error
(
'Downloaded executables cannot execute '
'on host (see https://github.com/flutter/flutter/issues/6207 for more information)'
));
valid
=
ValidationType
.
partial
;
}
return
new
ValidationResult
(
valid
,
messages
,
statusInfo:
'on
${os.name}
, locale
${platform.localeName}
, channel
${version.channel}
'
);
statusInfo:
'on
${os.name}
, locale
${platform.localeName}
, channel
${version.channel}
'
);
}
}
...
...
packages/flutter_tools/lib/src/services.dart
View file @
014a2255
...
...
@@ -78,7 +78,7 @@ Future<String> getServiceFromUrl(String url, String rootDir, String serviceName)
if
(
url
.
startsWith
(
'android-sdk:'
)
&&
androidSdk
!=
null
)
{
// It's something shipped in the standard android SDK.
return
url
.
replaceAll
(
'android-sdk:'
,
'
${androidSdk.directory}
/'
);
}
else
if
(
url
.
startsWith
(
'http'
))
{
}
else
if
(
url
.
startsWith
(
'http
:'
)
||
url
.
startsWith
(
'https:
'
))
{
// It's a regular file to download.
return
await
cache
.
getThirdPartyFile
(
url
,
serviceName
);
}
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