From c6d29e093e9aebc73ed4d357636c906ea09609fe Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Wed, 13 Feb 2013 12:36:01 +0100 Subject: [PATCH] Fixing issue with newlines after the data in -r mode --- lib/core/option.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/core/option.py b/lib/core/option.py index 11335c3a4..c5bbc0090 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -309,6 +309,8 @@ def _feedTargetsDict(reqFile, addedTargetUrls): elif key not in (HTTPHEADER.PROXY_CONNECTION, HTTPHEADER.CONNECTION): conf.httpHeaders.append((getUnicode(key), getUnicode(value))) + data = data.rstrip("\r\n") if data else data + if getPostReq and (params or cookie): if not port and isinstance(scheme, basestring) and scheme.lower() == "https": port = "443"