Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
apollo
Project
Overview
Details
Activity
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
openSource
apollo
Commits
58bd26e3
Commit
58bd26e3
authored
Jun 09, 2017
by
张乐
Committed by
GitHub
Jun 09, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #636 from nobodyiam/client-charset
fix default charset issue
parents
1ca1b8d1
bd4f3115
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
HttpUtil.java
...n/java/com/ctrip/framework/apollo/util/http/HttpUtil.java
+2
-1
No files found.
apollo-client/src/main/java/com/ctrip/framework/apollo/util/http/HttpUtil.java
View file @
58bd26e3
...
...
@@ -16,6 +16,7 @@ import com.google.common.base.Function;
import
com.google.common.io.BaseEncoding
;
import
com.google.common.io.CharStreams
;
import
com.google.gson.Gson
;
import
java.nio.charset.StandardCharsets
;
/**
* @author Jason Song(song_s@ctrip.com)
...
...
@@ -104,7 +105,7 @@ public class HttpUtil {
statusCode
=
conn
.
getResponseCode
();
if
(
statusCode
==
200
)
{
isr
=
new
InputStreamReader
(
conn
.
getInputStream
());
isr
=
new
InputStreamReader
(
conn
.
getInputStream
()
,
StandardCharsets
.
UTF_8
);
String
content
=
CharStreams
.
toString
(
isr
);
return
new
HttpResponse
<>(
statusCode
,
serializeFunction
.
apply
(
content
));
}
...
...
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