2014-09-03 23:55:51 +02:00
|
|
|
bnc#892821
|
|
|
|
|
|
|
|
Ignore HTTP error 403 if the location is a directory. This allows
|
|
|
|
the OS detection procedure to succeed when Indexes are disabled
|
|
|
|
on the HTTP server.
|
|
|
|
|
2014-10-29 18:03:15 +01:00
|
|
|
Index: virt-manager-1.1.0/virtinst/urlfetcher.py
|
2014-09-03 23:55:51 +02:00
|
|
|
===================================================================
|
2014-10-29 18:03:15 +01:00
|
|
|
--- virt-manager-1.1.0.orig/virtinst/urlfetcher.py
|
|
|
|
+++ virt-manager-1.1.0/virtinst/urlfetcher.py
|
|
|
|
@@ -142,8 +142,11 @@ class _HTTPImageFetcher(_URIImageFetcher
|
2014-09-03 23:55:51 +02:00
|
|
|
request.get_method = lambda: "HEAD"
|
|
|
|
urllib2.urlopen(request)
|
|
|
|
except Exception, e:
|
|
|
|
- logging.debug("HTTP hasFile: didn't find %s: %s", path, str(e))
|
|
|
|
- return False
|
|
|
|
+ if path.endswith("/") and e.code == 403:
|
|
|
|
+ logging.debug("HTTP hasFile: indexing disabled in %s?.", path)
|
|
|
|
+ else:
|
|
|
|
+ logging.debug("HTTP hasFile: didn't find %s: %s", path, str(e))
|
|
|
|
+ return False
|
|
|
|
return True
|
|
|
|
|
|
|
|
|