Adds support for libcurl's BUFFER and BUFFERPTR form parameters.
Adds support for libcurl's BUFFER and BUFFERPTR form parameters.

This allows one to use a string as a POST parameter.

Example usage:

 ...
 params = [
 ('x', (pycurl.FORM_BUFFER, "filename", pycurl.FORM_BUFFERPTR, "data"))
 ]
 c = pycurl.Curl()
 c.setopt(pycurl.HTTPPOST, params)
 ...

Although the API docs say that the buffer should not be freed
until curl_easy_cleanup() is called, I followed the liveness of
CurlObject.httppost within pycurl.c, since the API makes identical
assumptions.

https://sourceforge.net/p/pycurl/patches/9/

pycurl/pycurl,pycurl/pycurl,pycurl/pycurl