Re: Re: [RFC] [DISCUSSION] pecl_http

From: Date: Thu, 05 Feb 2015 08:58:43 +0000
Subject: Re: Re: [RFC] [DISCUSSION] pecl_http
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-81881@lists.php.net to get a copy of this message
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

« previous php.internals (#81881) next »