]> granicus.if.org Git - python/commit
Fix a horrible race condition -- various routines were storing the
authorGuido van Rossum <guido@python.org>
Fri, 13 Feb 1998 01:39:16 +0000 (01:39 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 13 Feb 1998 01:39:16 +0000 (01:39 +0000)
commit8a666e7c56192f42288a30a53adf5299fda29557
treebc9b249f38a4d0a90e725f9d4076e4fa94edff58
parente5bc49785c5aa6de9ca65754c1236e98e7c3a10f
Fix a horrible race condition -- various routines were storing the
most recently opened URL in self.openedurl of the URLopener instance.
This doesn't really work if multiple threads share the same opener
instance!

Fix: openedurl was actually simply the type prefix (e.g. "http:")
followed by the rest of the URL; since the rest of the URL is
available and the type is effectively determined by where you are in
the code, I can reconstruct the full URL easily, e.g. "http:" + url.
Lib/urllib.py