diff --git a/pyresttest/tests.py b/pyresttest/tests.py index d1ce09af..8cb613bd 100644 --- a/pyresttest/tests.py +++ b/pyresttest/tests.py @@ -350,7 +350,8 @@ def configure_curl(self, timeout=DEFAULT_TIMEOUT, context=None, curl_handle=None elif self.method == u'DELETE': curl.setopt(curl.CUSTOMREQUEST, 'DELETE') if bod is not None: - curl.setopt(pycurl.INFILESIZE, len(bod)) + curl.setopt(pycurl.POSTFIELDS, bod) + curl.setopt(pycurl.POSTFIELDSIZE, len(bod)) elif self.method == u'HEAD': curl.setopt(curl.NOBODY, 1) curl.setopt(curl.CUSTOMREQUEST, 'HEAD')