Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78098 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 53380 invoked from network); 15 Oct 2014 21:14:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Oct 2014 21:14:39 -0000 Authentication-Results: pb1.pair.com smtp.mail=ralph@ralphschindler.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=ralph@ralphschindler.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain ralphschindler.com from 209.85.218.47 cause and error) X-PHP-List-Original-Sender: ralph@ralphschindler.com X-Host-Fingerprint: 209.85.218.47 mail-oi0-f47.google.com Received: from [209.85.218.47] ([209.85.218.47:48883] helo=mail-oi0-f47.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 22/CF-03764-EB3EE345 for ; Wed, 15 Oct 2014 17:14:39 -0400 Received: by mail-oi0-f47.google.com with SMTP id a141so1661958oig.6 for ; Wed, 15 Oct 2014 14:14:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=FoaOvzp9O30ecXGcsOgC+GKH9ipYBSQTGx7Q4qodOKA=; b=lgVHshXret7ACuruAK68Gp/3XHi11B5SMdwifZdnneuFmTY17KshFMfBUevyv2Zmj8 OHSf15HZAu4iEWbYuNdLjQwccHlPhqpCr80tfeE242ZCWzIQuKFYAbqfmm5M3WzLu6nZ lXNcDKvm1cmEFSTEx6McQKpyufmRBjtnMKR78l8wg5UNJsDKNmwTnMNNGraT24+CTIuE yyK2wU9lSpodWZHzQiH9ndhqA9vqS23XUBTHwdg1ZIBAFstcvQNyRsP5kiPfE+HWjTUS ll1jQRO6urkK9R/S5T6/c/guo2TSLs15h02gf2wc+YoMwBVEabzIDRWY9xXua42/Cqrp DAVA== X-Gm-Message-State: ALoCoQnM/+I8lRgEILGkKkMDOTrBu2vQJLhiOsswt8XwCRsWynSbqYmovcGuTz7N/7i5GcsOEL0f X-Received: by 10.60.67.233 with SMTP id q9mr13312775oet.30.1413407675179; Wed, 15 Oct 2014 14:14:35 -0700 (PDT) Received: from [172.16.1.120] (ip174-73-14-247.no.no.cox.net. [174.73.14.247]) by mx.google.com with ESMTPSA id r136sm8816882oie.6.2014.10.15.14.14.33 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 15 Oct 2014 14:14:34 -0700 (PDT) Message-ID: <543EE3B8.7010407@ralphschindler.com> Date: Wed, 15 Oct 2014 16:14:32 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: internals@lists.php.net References: <776669CE-9E8C-4069-9834-C7275CCA0EF4@ajf.me> <8CB055D4-F164-4DF3-B019-684BAE7E016E@ajf.me> <543D47C1.9050009@lerdorf.com> <543D4CE1.5000109@lerdorf.com> <543D6864.10508@gmail.com> <543D85E6.2020507@lerdorf.com> <57b7a3681d6c2c7ae123c8921b2d19d6@mail.gmail.com> <543DCE2B.8010506@sugarcrm.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] New globals for PUT and DELETE From: ralph@ralphschindler.com (Ralph Schindler) >> I'm not sure I understand what you're trying to do, could you explain in >> more detail with examples? > > PUT /url > Content-type: application/x-www-form-urlencoded > > parse_str (file_get_contents(‘php://input'), $_POST) // Ok > > PUT /url > Content-type: multipart/mixed; boundary="xxxx" > > file_get_contents(‘php://input') // Empty string You are missing information in your example. First, PHP doesn't do content negotiation for every Content-Type known to send serialized data, it is extremely selective in that AFAIK, url/form encoded Content-Types, when POSTed, will be content-negotiated, parsed, and their resultant will populate the $_POST superglobal. Moreover, your 2nd example does not suggest that an HTTP request was sent with a body to demonstrate there is a bug here. With a php script being served at index.php with the following contents: