Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96925 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 46933 invoked from network); 16 Nov 2016 15:00:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Nov 2016 15:00:55 -0000 Authentication-Results: pb1.pair.com smtp.mail=the.warl0ck.1989@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=the.warl0ck.1989@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.47 as permitted sender) X-PHP-List-Original-Sender: the.warl0ck.1989@gmail.com X-Host-Fingerprint: 209.85.214.47 mail-it0-f47.google.com Received: from [209.85.214.47] ([209.85.214.47:36832] helo=mail-it0-f47.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 80/D1-05303-5A47C285 for ; Wed, 16 Nov 2016 10:00:53 -0500 Received: by mail-it0-f47.google.com with SMTP id l8so68393649iti.1 for ; Wed, 16 Nov 2016 07:00:53 -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=z555RLYXojwXWweEB2ijj1RKia+VDKVsWjc5dzzCrWU=; b=OtTh8V9gWukMM+bcbWa9QlkqfTIAH937zGI273bwJJjVHs9qh018VQ4LKGOM9w5hcB DGxOqe2j1vt0xSeHtPeRz4jSlYiBFg3A1dgFXptLb/6kDZdduH4z8NiD6LqwnvuX/zEq XRtn+nHOFOrnu+1Iw/r8kGo0PvZwojM9H/V7TW7kEG1B9VXP6+D87jR/htdXO3WDYh+P YGzqSY1ebeD9y3/PDjHC/dKO822pd/FTyTwEA/SaWTqExl+OvV3zwozLxWJ+57KdNkK2 npf8yy49NcAu3kYzgp7DJAJ7WgpjrHP/ryL0ntf1ICtltgEwKoQM/wTATuqyEtvCYdZi 9f3g== 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=z555RLYXojwXWweEB2ijj1RKia+VDKVsWjc5dzzCrWU=; b=ODV/G9QsZWgMeKI9r6aoCz7hNM+Oz7meuS8vJ3hg1G04RgzOmCd+pwqzgbpPolNAgX 9RsJyzNjGlJ4aeQiZ5fHBwwvblj4mNAQoT7nt9zmXo1l7b+YopV5aOfV70imhn4P9Eaz oBub2ivYGZ74MvqIvcQe1MSTIaPWEod8dEkUMXDg0N18IsMxfbZIcw4ckdvJhW6R/ndv iTH6v0cPubevnUCtJasgwZx7vGwYpjRVeEkbLiGpyusUcTyLqfHE41lycv6Nb5KiAOPg YfDFsIDH00ggs8JAR+px75TKqAlGtJt6oi7xGjuwR7aA/itca3x3MZ+HVzWGmiE/C2Pu 1ZaA== X-Gm-Message-State: ABUngvdJ58GdUUyoPPV6uN6MqxqUFeovy8UIG/+DM/n+IVi4i2ade6s4GTZ9d/38b2AGfx+iIcNyb0msY89ChQ== X-Received: by 10.107.161.78 with SMTP id k75mr3458134ioe.39.1479308450178; Wed, 16 Nov 2016 07:00:50 -0800 (PST) MIME-Version: 1.0 Received: by 10.64.135.230 with HTTP; Wed, 16 Nov 2016 07:00:49 -0800 (PST) In-Reply-To: References: Date: Wed, 16 Nov 2016 23:00:49 +0800 Message-ID: To: Marco Pivetta Cc: PHP Internals List Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Ask php cli to parse HTTP request From: the.warl0ck.1989@gmail.com (Aaron Lewis) 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