Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96918 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25957 invoked from network); 16 Nov 2016 12:44:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Nov 2016 12:44:10 -0000 Authentication-Results: pb1.pair.com header.from=ocramius@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ocramius@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.41 as permitted sender) X-PHP-List-Original-Sender: ocramius@gmail.com X-Host-Fingerprint: 74.125.82.41 mail-wm0-f41.google.com Received: from [74.125.82.41] ([74.125.82.41:32860] helo=mail-wm0-f41.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 55/DE-05303-4945C285 for ; Wed, 16 Nov 2016 07:44:06 -0500 Received: by mail-wm0-f41.google.com with SMTP id c184so32240749wmd.0 for ; Wed, 16 Nov 2016 04:44:04 -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=hWLGngY728gNcplc8V8kYftsJGyTQ+gqI/1yPm+OHn0=; b=p6J3sdqvkQfSKZQj1OvKgGTK096v/2SmAkiJzZWDpXwY0VGL7o8hYsZWroHknggqfA fJZOHlITR7FA9xN0ZLAjg/PGrlg4HsYIkH1TLrsIdpBYLl6zfA6SZptO/S4MgS5GDEWT cFkjuwmctzXajsjT7yIs0HXsSnwBWgiEE8BhwEfJH6eOE2QOg7UwhMm+sI2qQkeGPcet hvPyAOAnys5Y5FoDGZQGZuqUjj+8ZVq6waz3wCncNfdQMZTSGSMyDexOi7ZFzjRCuNry AuPuWN/m0NkVMtOF3BTQvYWmUBAuByK/DoUFAiBE9J1Bppn24t+FJu8A84EHkWanmuOy ufdQ== 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=hWLGngY728gNcplc8V8kYftsJGyTQ+gqI/1yPm+OHn0=; b=GbP84TUhwMZzfh+XMj3djCwGI0GGmpCOOaAt9uwn0Yh+aN0b/sGPRrk9EKnf+Old/7 NAUhqRmAvrpc/EG/7fUSgltpCTCZIiZ0JWG0oRnJdRvenwTecai4coZO2RnSzacD+QHT 1eqA2P7iPJ9bwf8q0A4FO6Nuq0pKt+xfEW4jRwAL3zPcYHZkxB/Ai/fwUWaj3vlwasQl D/RGc8w6rwsEPr3i7Z8f8RCa1CcPtwgmK1Wq3SS1Tw3F9eOwpMA4epbb4Z/ETp+yTPnE ItP6kA/aaO+etTPTpd9zbVzt2n5uwfVlDmfEOsOW69qa2ij9j79KZOiklpV5WZ66HoU2 8RBw== X-Gm-Message-State: ABUngvfbVR+yK2boDxysq0wTIqMGn2uVvoJlPiEH+mgudEWl+a8hfSpZLg4uQxOpIPO9FGzEgFAVmt8sbV8Jtg== X-Received: by 10.28.191.87 with SMTP id p84mr9695288wmf.63.1479300241877; Wed, 16 Nov 2016 04:44:01 -0800 (PST) MIME-Version: 1.0 Received: by 10.194.223.74 with HTTP; Wed, 16 Nov 2016 04:43:59 -0800 (PST) Received: by 10.194.223.74 with HTTP; Wed, 16 Nov 2016 04:43:59 -0800 (PST) In-Reply-To: References: Date: Wed, 16 Nov 2016 13:43:59 +0100 Message-ID: To: Aaron Lewis Cc: PHP Internals List Content-Type: multipart/alternative; boundary=94eb2c0728026ef08a05416a6d8f Subject: Re: [PHP-DEV] Ask php cli to parse HTTP request From: ocramius@gmail.com (Marco Pivetta) --94eb2c0728026ef08a05416a6d8f Content-Type: text/plain; charset=UTF-8 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 > > --94eb2c0728026ef08a05416a6d8f--