Minor bug fix

This commit is contained in:
Bernardo Damele 2010-10-31 12:20:38 +00:00
parent 264247d318
commit 2a2f949275

View File

@ -624,13 +624,15 @@ class Agent:
if inpStr:
if urlencode_:
regObj = getCompiledRegex("%s(?P<result>.*?)%s" % (PAYLOAD_DELIMITER, PAYLOAD_DELIMITER))
regObj = getCompiledRegex("(?P<result>%s.*?%s)" % (PAYLOAD_DELIMITER, PAYLOAD_DELIMITER))
for match in regObj.finditer(inpStr):
retVal = retVal.replace(match.group("result"), urlencode(match.group("result"), convall=True))
retVal = retVal.replace(match.group("result"), urlencode(match.group("result").strip(PAYLOAD_DELIMITER), convall=True))
else:
retVal = retVal.replace(PAYLOAD_DELIMITER, '')
print retVal
return retVal
def extractPayload(self, inpStr):