##// END OF EJS Templates
url: use `iter(callable, sentinel)` instead of while True...
Augie Fackler -
r29729:44ea1275 default
parent child Browse files
Show More
@@ -208,18 +208,14 b' def _generic_proxytunnel(self):'
208 version, status, reason = res._read_status()
208 version, status, reason = res._read_status()
209 if status != httplib.CONTINUE:
209 if status != httplib.CONTINUE:
210 break
210 break
211 while True:
211 # skip lines that are all whitespace
212 skip = res.fp.readline().strip()
212 list(iter(lambda: res.fp.readline().strip(), ''))
213 if not skip:
214 break
215 res.status = status
213 res.status = status
216 res.reason = reason.strip()
214 res.reason = reason.strip()
217
215
218 if res.status == 200:
216 if res.status == 200:
219 while True:
217 # skip lines until we find a blank line
220 line = res.fp.readline()
218 list(iter(res.fp.readline, '\r\n'))
221 if line == '\r\n':
222 break
223 return True
219 return True
224
220
225 if version == 'HTTP/1.0':
221 if version == 'HTTP/1.0':
General Comments 0
You need to be logged in to leave comments. Login now