File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed
api/src/main/java/com/ning/http/client/providers Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -109,16 +109,12 @@ public List<Cookie> getCookies() {
109
109
110
110
protected String calculateCharset (String charset ) {
111
111
112
- if (charset == null ) {
113
- String contentType = getContentType ();
114
- if (contentType != null ) {
115
- charset = AsyncHttpProviderUtils .parseCharset (contentType );
116
- } else {
117
- charset = DEFAULT_CHARSET ;
118
- }
119
- }
120
-
121
- return charset ;
112
+ if (charset == null ) {
113
+ String contentType = getContentType ();
114
+ if (contentType != null )
115
+ charset = AsyncHttpProviderUtils .parseCharset (contentType ); // parseCharset can return null
116
+ }
117
+ return charset != null ? charset : DEFAULT_CHARSET ;
122
118
}
123
119
124
120
public boolean hasResponseStatus () {
You can’t perform that action at this time.
0 commit comments