Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:51993 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 81182 invoked from network); 23 Apr 2011 13:23:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Apr 2011 13:23:07 -0000 Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=tyra3l@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.42 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 209.85.215.42 mail-ew0-f42.google.com Received: from [209.85.215.42] ([209.85.215.42:56769] helo=mail-ew0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FA/32-55446-8B2D2BD4 for ; Sat, 23 Apr 2011 09:23:05 -0400 Received: by ewy2 with SMTP id 2so365219ewy.29 for ; Sat, 23 Apr 2011 06:23:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=LaeTLVlt61NQ4G4TUnZELnM8A64boiXnBpu8MWCLS8E=; b=RptVRbqMh8dN4fCIkh+j23GiHV3SXimyJ01TAMX4pcbm5SwXaxMDumVJON+DpbfXF5 ShCyjKRr+BEzmJs0GHX6GzN5rmdOnhZhLSpDJTNnOtOZ/2d/ACmFCy/oaEGSxbVBpefk MUDzfq63K0mskTqG17Y1q44HVkKbJakXq16ks= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=TT4Wo+rPVDbrnyQ5c2SoyTq9gjs7VMpTQtemew6s9ZLkj0O4QbDfkdexEzuoWoJyRM StjWfFn7Lg/uk0t7OobsLK0OnecKt3BVwYea7PoWEqabnt3+G8SunKWByAOf9UuRd9gk EUlPZ2n/iKoWMxiAr3dX+AfQvYyAZmkWcL4nI= MIME-Version: 1.0 Received: by 10.14.4.95 with SMTP id 71mr560648eei.240.1303564980955; Sat, 23 Apr 2011 06:23:00 -0700 (PDT) Sender: tyra3l@gmail.com Received: by 10.14.119.69 with HTTP; Sat, 23 Apr 2011 06:23:00 -0700 (PDT) In-Reply-To: References: Date: Sat, 23 Apr 2011 15:23:00 +0200 X-Google-Sender-Auth: a5C5Hx6gSK6Zeq_RGkeRzyQiNk0 Message-ID: To: Gustavo Lopes Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=0016364c71afa1aba704a195dfe6 Subject: Re: [PHP-DEV] [PATCH] Add option to disable POST data processing From: info@tyrael.hu (Ferenc Kovacs) --0016364c71afa1aba704a195dfe6 Content-Type: text/plain; charset=UTF-8 On Tue, Dec 7, 2010 at 8:08 AM, Gustavo Lopes wrote: > The very simple attached patch adds an option to disable POST data > processing, which implies the data can only be read in a stream fashion > through php://input. > > As far as I know, PHP offers no way to inhibit processing RFC 1867 data and > one has to use very hacky means to accomplish that. This is often required > (or at least convenient) in order to, e.g., proxy requests or handle file > uploads in memory. > > For other types of requests, the default processing of POST data may also > be a problem. Take a non-application/x-www-form-urlencoded POST requests > (say, some kind of RPC with a big XML payload) -- PHP is very memory > inefficient as it will hold the whole POST data into memory and duplicate it > twice (from SG(request_info).post_data to $HTTP_RAW_POST_DATA -- even if > always_populate_raw_post_data=0 -- and SG(request_info).raw_post_data). > > This introduces a new ini setting, disable_post_data_processing, but it's a > benign one. No incompatibilities between setups will arise because no one > will enable it globally (it would be insane), only selectively to the > scripts that require it. The reason for an ini setting is that it must be > set early in the request life. > > Thoughts? > > -- > Gustavo Lopes > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > Did we agree on something about this improvement/patch? as I said, I like the idea, but if we cannot agree on the details(how to control that which script needs this), could we somehow at least make it possible to read the raw post through php://input for "multipart/form-data" requests? currently just no way to read the raw data for those requests which sucks big time. Tyrael --0016364c71afa1aba704a195dfe6--