From 226547b7dcddd8679e0e2206a33227766e99d330 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Mon, 28 May 2012 09:04:25 +0000 Subject: [PATCH] minor fix for --skip-urlencode and custom post --- lib/request/connect.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/request/connect.py b/lib/request/connect.py index af3737fbb..dc938b5b2 100644 --- a/lib/request/connect.py +++ b/lib/request/connect.py @@ -562,7 +562,7 @@ class Connect: # addendum: as we support url encoding in tampering # functions therefore we need to use % as a safe char if place != PLACE.URI or (value and payload and '?' in value and value.find('?') < value.find(payload)): - payload = urlencode(payload, '%', False, True) if not place == PLACE.POST and conf.skipUrlEncode else payload + payload = urlencode(payload, '%', False, True) if not place in (PLACE.POST, PLACE.CUSTOM_POST) and conf.skipUrlEncode else payload value = agent.replacePayload(value, payload) elif place == PLACE.SOAP: @@ -656,7 +656,7 @@ class Connect: get += "%s%s=%s" % (delimiter, name, value) get = urlencode(get, limit=True) - if post and place not in (PLACE.POST, PLACE.SOAP) and hasattr(post, UNENCODED_ORIGINAL_VALUE): + if post and place not in (PLACE.POST, PLACE.SOAP, PLACE.CUSTOM_POST) and hasattr(post, UNENCODED_ORIGINAL_VALUE): post = getattr(post, UNENCODED_ORIGINAL_VALUE) elif not conf.skipUrlEncode and place not in (PLACE.SOAP,): post = urlencode(post)