Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:86141 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 57963 invoked from network); 8 May 2015 20:08:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 May 2015 20:08:47 -0000 Authentication-Results: pb1.pair.com smtp.mail=irker@irker.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=irker@irker.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain irker.net from 74.125.82.46 cause and error) X-PHP-List-Original-Sender: irker@irker.net X-Host-Fingerprint: 74.125.82.46 mail-wg0-f46.google.com Received: from [74.125.82.46] ([74.125.82.46:34062] helo=mail-wg0-f46.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 79/21-41461-EC71D455 for ; Fri, 08 May 2015 16:08:46 -0400 Received: by wgic8 with SMTP id c8so55451907wgi.1 for ; Fri, 08 May 2015 13:08:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; bh=XEn8N0HML4GhOUAyJPYGZR1Y94/2UmgaJs9Md2RssQQ=; b=QLbGEtBWSsRTJ95wS9n/+/jNWsZgu+ey6+hItH5B6xXcjgVfCcPKLHsM+S9fPXckAN PyuxLu4ZlPy1p1BLH624ruqxaclgqrD9ylX0iZQZ2WN9eG6L5zVzyE6qxgZkt+TrLAk/ JD9Od/53BuuuTyKC+cWFgG2qEn15vQ1/1C0ZgJzrVYN+IeA5pSvuXfc5IqvuodHUSoN2 9tl05kXYhiw4YLeu9wha0iav+6bbfyfZetvvL4mbnpKl0A1BU3omqQXi2s/t7an+ZEmP FDn3HJkaXc9EgnKH4LuNuRgbiwOOFTGqCQplhbT4Llq/8DRx7CzVaY/Yt8njQzY89+BF tfKw== X-Gm-Message-State: ALoCoQmKalu4Dk8cU8p/h+qlgzJf1cqluNm8wpseUrKnXLrlwBCdzRapWbdQwJP0zihR2JrWgnKo X-Received: by 10.194.9.161 with SMTP id a1mr10539851wjb.39.1431115722890; Fri, 08 May 2015 13:08:42 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.152.146 with HTTP; Fri, 8 May 2015 13:08:22 -0700 (PDT) In-Reply-To: References: Date: Fri, 8 May 2015 23:08:22 +0300 Message-ID: To: PHP Internals Content-Type: multipart/alternative; boundary=047d7b5d34fa4bb6d70515979833 Subject: Re: [PHP-DEV] PR 1217: Add support for upload files from buffer string in curl extenion From: irker@irker.net (Alexander Moskalev) --047d7b5d34fa4bb6d70515979833 Content-Type: text/plain; charset=UTF-8 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 --047d7b5d34fa4bb6d70515979833--