Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 4 commits into from Oct 21, 2013

Conversation

p
Copy link
Member

@p p commented Sep 26, 2013

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/

kevinko and others added 4 commits October 21, 2013 13:31
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/
p added a commit that referenced this pull request Oct 21, 2013
Adds support for libcurl's BUFFER and BUFFERPTR form parameters.
@p p merged commit 1077765 into pycurl:master Oct 21, 2013
@p p deleted the form-buffer branch November 4, 2013 23:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants