centralization of urlencoding should be (only) in connect.py and we are from now on handling non-urlencoded data at other levels

This commit is contained in:
Miroslav Stampar
2011-01-27 19:44:24 +00:00
parent 49aeb41be8
commit 8e74c571bc
4 changed files with 9 additions and 15 deletions

View File

@@ -716,20 +716,14 @@ class Agent:
return retVal
def removePayloadDelimiters(self, inpStr, urlencode_=True):
def removePayloadDelimiters(self, inpStr):
"""
Removes payload delimiters from inside the input string
"""
retVal = inpStr
if inpStr:
if urlencode_:
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").strip(PAYLOAD_DELIMITER), convall=True))
else:
retVal = retVal.replace(PAYLOAD_DELIMITER, '')
retVal = retVal.replace(PAYLOAD_DELIMITER, '')
return retVal