mirror of https://github.com/apache/cloudstack.git
Fix null input stream issue
This commit is contained in:
parent
c8628a4593
commit
12c1db7556
|
|
@ -440,8 +440,8 @@ public class UriUtils {
|
|||
GetMethod getMethod = new GetMethod(metalinkUrl);
|
||||
List<String> urls = new ArrayList<>();
|
||||
try {
|
||||
InputStream is = getMethod.getResponseBodyAsStream();
|
||||
if (httpClient.executeMethod(getMethod) == HttpStatus.SC_OK) {
|
||||
InputStream is = getMethod.getResponseBodyAsStream();
|
||||
Map<String, List<String>> metalinkUrlsMap = getMultipleValuesFromXML(is, new String[] {"url"});
|
||||
if (metalinkUrlsMap.containsKey("url")) {
|
||||
List<String> metalinkUrls = metalinkUrlsMap.get("url");
|
||||
|
|
|
|||
Loading…
Reference in New Issue