diff options
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/rfc822.py | 10 | ||||
-rw-r--r-- | Lib/urllib.py | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/Lib/rfc822.py b/Lib/rfc822.py index 580102c..886098c 100644 --- a/Lib/rfc822.py +++ b/Lib/rfc822.py @@ -96,7 +96,7 @@ class Message: elif headerseen and line[0] in ' \t': # It's a continuation line. list.append(line) - elif regex.match('^[!-9;-~]+:', line): + elif regex.match('^[!-9;-~]+:', line) >= 0: # It's a header line. list.append(line) headerseen = 1 @@ -157,11 +157,11 @@ class Message: list = [] hit = 0 for line in self.headers: - if string.lower(line[:n]) == name: - hit = 1 - elif line[:1] not in string.whitespace: - if hit: + if hit: + if line[:1] not in string.whitespace: break + elif string.lower(line[:n]) == name: + hit = 1 if hit: list.append(line) return list diff --git a/Lib/urllib.py b/Lib/urllib.py index 14fcefa..e8f56a7 100644 --- a/Lib/urllib.py +++ b/Lib/urllib.py @@ -191,7 +191,7 @@ class URLopener: dirs, file = dirs[:-1], dirs[-1] if dirs and not dirs[0]: dirs = dirs[1:] key = (user, host, port, string.joinfields(dirs, '/')) - print 'key =', key +## print 'key =', key try: if not self.ftpcache.has_key(key): self.ftpcache[key] = \ |