This commit is contained in:
Redkale
2016-11-14 15:49:03 +08:00
parent ee9fb4a9b8
commit e55fc1a421

View File

@@ -642,7 +642,7 @@ public final class Utility {
conn.disconnect();
return remoteHttpContent(ctx, method, newurl, headers, body);
}
InputStream in = rs < 400 || rs == 404 ? conn.getInputStream() : conn.getErrorStream();
InputStream in = (rs < 400 || rs == 404) && rs != 405 ? conn.getInputStream() : conn.getErrorStream();
ByteArrayOutputStream out = new ByteArrayOutputStream(1024);
byte[] bytes = new byte[1024];
int pos;