Re: PR 1217: Add support for upload files from buffer string in curl extenion
| From: | Alexander Moskalev | Date: | Fri, 08 May 2015 20:08:22 +0000 |
| Subject: | Re: PR 1217: Add support for upload files from buffer string in curl extenion | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-86141@lists.php.net to get a copy of this message | ||
Hi!
I try rewrite feature to use exists class:
https://github.com/php/php-src/commit/6319f954ca0674c77bb1f8f8409c9ac841fe301d
Please, take a look at this commit.
1) constructor does not require params
2) added curl_buffer_file_create function (like curl_file_create)
3) setters changed to allow binary data. May be it isn't good idea, but all
properties already have public access, so we can already set bad values. So
it just make common behavior for setters and manual setting properties.
4) If file name cast to true and contain a string - we use it.
5) If it still cast to true, but contain not a string - we report error
6) If file name cast to false - we use buffer
Please, check my commit and later I will create new pull request.
Thank you!
--
With regards, Alexander Moskalev
irker@irker.net
irker@php.net
a.moskalev@corp.badoo.com