Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96927 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 50619 invoked from network); 16 Nov 2016 15:18:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Nov 2016 15:18:35 -0000 Authentication-Results: pb1.pair.com smtp.mail=ocramius@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ocramius@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.46 as permitted sender) X-PHP-List-Original-Sender: ocramius@gmail.com X-Host-Fingerprint: 74.125.82.46 mail-wm0-f46.google.com Received: from [74.125.82.46] ([74.125.82.46:36146] helo=mail-wm0-f46.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DA/82-05303-7C87C285 for ; Wed, 16 Nov 2016 10:18:33 -0500 Received: by mail-wm0-f46.google.com with SMTP id g23so246241121wme.1 for ; Wed, 16 Nov 2016 07:18:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=d5g7eFsB9DYEk3rDdSm65REIafZlkv5y/WyZ9+B9wZU=; b=eWrO16aqAonFkdZ/JkuAi/jtuRShTIDh/7ImgSAueJRXcUYZXdE/FY+zAgUCZWnMsI xKH74V+5FfY9sJjmo/zkm0FEpbhV2LfUx4FmT2EWZvm9Mwt4IT4ubEr+KYdIxxvEZTfE SuGxM/MjYgnaTgo4Ukvl+oxkGaeFXObWkvpk76BBq4VC1IEirbBhDbYY7SZY4P8/oj82 X8wIHMPb3dn9TkHP0X4HqwWciBv5nkjXcrK38+3FoLO3rk5Gy/wE6+hMNio+06CAEfNQ JXwx2o0+Jhu920+5LGiOy3/olDR/UANEKAMn1fj/QS16d+BwbfxSwtpJX5CFiXxI4Rfj bj5w== 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:cc; bh=d5g7eFsB9DYEk3rDdSm65REIafZlkv5y/WyZ9+B9wZU=; b=hGjbjQQVxQSoLEnAjS4t0287MLH14TQo+IiNv7H9ECQmzKhu5XjOx+vQzHSjL6tBaJ Q9npHMAyki6RpEVBzdUlkt56IUJft7ju0EJx9wjkcuelOH/NDX9Av3R9PFzDEhioeOee FrSHn0kuSIZO8xGiJaEFMp4kqt2G1gDYHV3WJewZXiNrnrqohCM9LfRlKWvRa4nz0qts mK2fI4mrCN3mQn4u6JJEIgBtPe7YVbARMLScu0y0AzL0W74IXDqrEnjEaRVD6UZ3sIsz 6cQS7Y42t2ewgp2m28Lcgi98bx4oK2f5C49wuSKPZ/jraSp5rb38yMSsLvIW9oh8Jsmp m4eg== X-Gm-Message-State: ABUngvcxmHTj/rB09FXEclDQN2nREPGv3w4L+mByfU6/yOdlGfvvG74lFQq+3jH7hmbCiorkOtEb6LcGP62H4w== X-Received: by 10.28.156.10 with SMTP id f10mr10947226wme.63.1479309508696; Wed, 16 Nov 2016 07:18:28 -0800 (PST) MIME-Version: 1.0 Received: by 10.194.223.74 with HTTP; Wed, 16 Nov 2016 07:18:24 -0800 (PST) Received: by 10.194.223.74 with HTTP; Wed, 16 Nov 2016 07:18:24 -0800 (PST) In-Reply-To: References: Date: Wed, 16 Nov 2016 16:18:24 +0100 Message-ID: To: Aaron Lewis Cc: PHP Internals List Content-Type: multipart/alternative; boundary=001a114b4378c75fcb05416c95b4 Subject: Re: [PHP-DEV] Ask php cli to parse HTTP request From: ocramius@gmail.com (Marco Pivetta) --001a114b4378c75fcb05416c95b4 Content-Type: text/plain; charset=UTF-8 One question then: why? Working userland impl, just use it. On 16 Nov 2016 16:01, "Aaron Lewis" wrote: > Thanks Marco. > > But I'm looking for the C implementation .. > > On Wed, Nov 16, 2016 at 8:43 PM, Marco Pivetta wrote: > > Maybe something like https://github.com/guzzle/ > psr7/blob/master/README.md? > > There are additional middlewares that can extract from a request and > > populate super-globals for legacy app support purposes. > > > > > > On 16 Nov 2016 11:50, "Aaron Lewis" wrote: > >> > >> I have a file that contains a HTTP request, > >> > >> ``` > >> GET /xxx.php > >> Host: xxx > >> Content-Type: xxx > >> ... > >> ``` > >> > >> I would like to ask PHP cli to parse the HTTP request from a file, and > >> setup $_FILES, $_POST, $_SERVER etc. > >> What should I do? I'm familiar with PHP extensions, so I'm capable of > >> modifying SAPI myself. > >> > >> So far I've found sapi_post_entry, but I couldn't get the whole > >> picture. Where's the entry point of request parsing? > >> > >> > >> -- > >> Best Regards, > >> Aaron Lewis - PGP: 0x13714D33 - http://pgp.mit.edu/ > >> Finger Print: 9F67 391B B770 8FF6 99DC D92D 87F6 2602 1371 4D33 > >> > >> -- > >> PHP Internals - PHP Runtime Development Mailing List > >> To unsubscribe, visit: http://www.php.net/unsub.php > >> > > > > > > -- > Best Regards, > Aaron Lewis - PGP: 0x13714D33 - http://pgp.mit.edu/ > Finger Print: 9F67 391B B770 8FF6 99DC D92D 87F6 2602 1371 4D33 > --001a114b4378c75fcb05416c95b4--