Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:81881 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 8905 invoked from network); 5 Feb 2015 08:58:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Feb 2015 08:58:48 -0000 Authentication-Results: pb1.pair.com header.from=mike.php.net@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=mike.php.net@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.174 as permitted sender) X-PHP-List-Original-Sender: mike.php.net@gmail.com X-Host-Fingerprint: 209.85.212.174 mail-wi0-f174.google.com Received: from [209.85.212.174] ([209.85.212.174:64688] helo=mail-wi0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DC/1A-51979-8C033D45 for ; Thu, 05 Feb 2015 03:58:48 -0500 Received: by mail-wi0-f174.google.com with SMTP id n3so37340091wiv.1 for ; Thu, 05 Feb 2015 00:58:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=DN+NmcWbIel1V9aLQmaxPOfr2JsubfFUj0g/oBSPqck=; b=fYqa7ca4p+bchSoldjc2V7e7HFeBXVlJtX3HMWYu5a3JZTBTGFG6/q7qXk0P6czx/Z JqW659zoMTuzRP3K/tI3dcjqAfS9rsZJVVWt3Zysd1HNZZtLFIDJMA7dS6pu4xl2mgY2 Sa1j/AF2rvpL8MeTDqD4fGlf0QTfougQgyRMDgtAkfzHB5754cQOKxom7jHH5uX+62YV cR3rt0qsQmHxM8UA7jzyrHtIcrE8ro8pOI8yUuKInA76lnL8f4Z8edJdvKUB1IYDGDpT ibzfBRz/YIulNBfLIJPS8a7LxaCsahHiib4pML19D8QKoZQD/601iz2Qlw3RY4SvX86r JQ6g== X-Received: by 10.194.21.134 with SMTP id v6mr5391268wje.140.1423126724899; Thu, 05 Feb 2015 00:58:44 -0800 (PST) Received: from [192.168.2.120] (89-104-28-113.customer.bnet.at. [89.104.28.113]) by mx.google.com with ESMTPSA id hn2sm6380403wjc.5.2015.02.05.00.58.43 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Feb 2015 00:58:43 -0800 (PST) Sender: Michael Wallner Message-ID: <54D330C3.7030001@php.net> Date: Thu, 05 Feb 2015 09:58:43 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Stanislav Malyshev , PHP Internals References: <54D217E7.8030407@php.net> <54D2AE91.8090800@gmail.com> <54D3271E.2080207@php.net> <54D32A38.9050004@gmail.com> In-Reply-To: <54D32A38.9050004@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: [RFC] [DISCUSSION] pecl_http From: mike@php.net (Michael Wallner) Hi Stas! On 05/02/15 09:30, Stanislav Malyshev wrote: >> The sole code change would be removing the check for POST, i.e. >> `!strcasecmp(SG(request_method),"POST")` so that actually any request >> method with a recognized content-type (i.e. application/form-data or >> application/x-www-form-urlencoded) would trigger standard post data >> handling. > > By "standard post data handling" you mean _POST? I'm not sure it's a > good idea - it may lead some applications that assume _POST existence > means POST request into a wrong path, which may have some bad > consequences as GET and POST to the same URL may have completely > different meaning in REST application (e.g. GET may be read and POST may > be write). Why not just let the user ask for data if they need it, but > keep the environment as is for those that do not need it? Yes, I mean $_POST (and $_FILES). It's been requested multiple times, but I know it's quite controversial. I think this approach is better than any other proposed yet (think $_PUT and stuff). If I receive form-data or www-form-urlencoded I'd like to have it readily accessible, but that may only be my opinion, and I definitely won't insist on it, so if people think this is too much for the naive application testing $_POST for being a POST, I'll remove it. Anybody else having an opinon on that matter? -- Regards, Mike