We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Hi, when try to do a post request with binary data as:
http(('POST', url, headers, 'application/octet-stream', http.bytea_to_text(data))::http.http_request);
It's failed to upload whole data , only few bytes received on server.
In the http.c file line 1203 shows:
CURL_SETOPT(g_http_handle, CURLOPT_POSTFIELDS, text_to_cstring(content_text));
This is only allow C-style null terminated data.
CURL_SETOPT(g_http_handle, CURLOPT_POSTFIELDS, (char *)(VARDATA(content_text))); CURL_SETOPT(g_http_handle, CURLOPT_POSTFIELDSIZE, content_size);
The above 2 lines can fix this issue.
The text was updated successfully, but these errors were encountered:
Thanks, your patch helped me.
Sorry, something went wrong.
f826cfc
No branches or pull requests
Hi, when try to do a post request with binary data as:
http(('POST', url, headers, 'application/octet-stream', http.bytea_to_text(data))::http.http_request);
It's failed to upload whole data , only few bytes received on server.
In the http.c file line 1203 shows:
CURL_SETOPT(g_http_handle, CURLOPT_POSTFIELDS, text_to_cstring(content_text));
This is only allow C-style null terminated data.
CURL_SETOPT(g_http_handle, CURLOPT_POSTFIELDS, (char *)(VARDATA(content_text)));
CURL_SETOPT(g_http_handle, CURLOPT_POSTFIELDSIZE, content_size);
The above 2 lines can fix this issue.
The text was updated successfully, but these errors were encountered: