mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
implicitly replace https -> http for download_url
This commit is contained in:
parent
abae156103
commit
61f2bafdf7
@ -1737,6 +1737,15 @@ class Packager:
|
||||
for a given host, for instance. Returns the newly-created
|
||||
HostEntry object."""
|
||||
|
||||
scheme = URLSpec(host).getScheme()
|
||||
if scheme == 'https' and downloadUrl is None:
|
||||
# If we specified an SSL-protected host URL, but no
|
||||
# explicit download URL, then assume the download URL is
|
||||
# the same, over cleartext.
|
||||
url = URLSpec(host)
|
||||
url.setScheme('http')
|
||||
downloadUrl = url.getUrl()
|
||||
|
||||
he = self.hosts.get(host, None)
|
||||
if he is None:
|
||||
# Define a new host entry
|
||||
@ -2688,6 +2697,10 @@ class Packager:
|
||||
processing. """
|
||||
|
||||
self.hosts = {}
|
||||
# Since we've blown away the self.hosts map, we have to make
|
||||
# sure that our own host at least is added to the map.
|
||||
self.addHost(self.host)
|
||||
|
||||
self.contents = {}
|
||||
self.contentsChanged = False
|
||||
|
||||
@ -2713,10 +2726,6 @@ class Packager:
|
||||
self.contents[pe.getKey()] = pe
|
||||
xpackage = xpackage.NextSiblingElement('package')
|
||||
|
||||
# Since we've blown away the self.hosts map, we have to make
|
||||
# sure that our own host at least is added to the map.
|
||||
self.addHost(self.host)
|
||||
|
||||
def writeContentsFile(self):
|
||||
""" Rewrites the contents.xml file at the end of
|
||||
processing. """
|
||||
|
Loading…
x
Reference in New Issue
Block a user