Patch for an Issue #452

This commit is contained in:
Miroslav Stampar
2013-05-25 18:52:59 +02:00
parent a85a0e53de
commit f3f752d85c
2 changed files with 47 additions and 33 deletions

View File

@@ -258,15 +258,19 @@ def _feedTargetsDict(reqFile, addedTargetUrls):
newline = None
lines = request.split('\n')
for line in lines:
for index in xrange(len(lines)):
line = lines[index]
if not line.strip() and index == len(lines) - 1:
break
newline = "\r\n" if line.endswith('\r') else '\n'
line = line.strip('\r')
match = re.search(r"\A(%s) (.+) HTTP/[\d.]+\Z" % "|".join(getPublicTypeMembers(HTTPMETHOD, True)), line) if not method else None
if len(line) == 0:
if method in (HTTPMETHOD.POST, HTTPMETHOD.PUT) and data is None:
data = ""
params = True
if len(line) == 0 and method in (HTTPMETHOD.POST, HTTPMETHOD.PUT) and data is None:
data = ""
params = True
elif match:
method = match.group(1)