Skip to content

Commit 226547b

Browse files
committed
minor fix for --skip-urlencode and custom post
1 parent 75dd1d6 commit 226547b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/request/connect.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ def queryPage(value=None, place=None, content=False, getRatioValue=False, silent
562562
# addendum: as we support url encoding in tampering
563563
# functions therefore we need to use % as a safe char
564564
if place != PLACE.URI or (value and payload and '?' in value and value.find('?') < value.find(payload)):
565-
payload = urlencode(payload, '%', False, True) if not place == PLACE.POST and conf.skipUrlEncode else payload
565+
payload = urlencode(payload, '%', False, True) if not place in (PLACE.POST, PLACE.CUSTOM_POST) and conf.skipUrlEncode else payload
566566
value = agent.replacePayload(value, payload)
567567

568568
elif place == PLACE.SOAP:
@@ -656,7 +656,7 @@ def _randomizeParameter(paramString, randomParameter):
656656
get += "%s%s=%s" % (delimiter, name, value)
657657

658658
get = urlencode(get, limit=True)
659-
if post and place not in (PLACE.POST, PLACE.SOAP) and hasattr(post, UNENCODED_ORIGINAL_VALUE):
659+
if post and place not in (PLACE.POST, PLACE.SOAP, PLACE.CUSTOM_POST) and hasattr(post, UNENCODED_ORIGINAL_VALUE):
660660
post = getattr(post, UNENCODED_ORIGINAL_VALUE)
661661
elif not conf.skipUrlEncode and place not in (PLACE.SOAP,):
662662
post = urlencode(post)

0 commit comments

Comments
 (0)