Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96917 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 20074 invoked from network); 16 Nov 2016 11:38:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Nov 2016 11:38:30 -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.44 as permitted sender) X-PHP-List-Original-Sender: the.warl0ck.1989@gmail.com X-Host-Fingerprint: 209.85.214.44 mail-it0-f44.google.com Received: from [209.85.214.44] ([209.85.214.44:35378] helo=mail-it0-f44.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 21/4E-05303-3354C285 for ; Wed, 16 Nov 2016 06:38:28 -0500 Received: by mail-it0-f44.google.com with SMTP id c20so204584789itb.0 for ; Wed, 16 Nov 2016 03:38:27 -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=HysbYS4JXNpNGd+evY6MK4Qvw5qa0wAO09QKKEEWVFs=; b=oFPyu7jJCKao/ywZBzYoW1EEocXmd3sQ8rwcxFhcqDCTmqK0AUFLUM12WMQJ+sQgW8 Jkd+knz7xAOqKhFGRn/Fk0p+IwXlapHacyF0E/gT+0j3H7f6Peic5J4BT7LJYoeUeNE2 KgRpMM+Ju2k4/K00oRaAH1pm/wB5vS7+CvpE+YSIxNmoPXg3S9ZXSPRm9mRP6dizPRpP EAP2vsW0pXbZoybUs9HwSLUWP0MGp+1T/n3OzSjJxNWglljV62H12i39qgJw3o9pvCqC Ljyl9sJuev/69mPPOYU0Gw+ycLYAUHJkZS6pq/gCmNtjsKCQ40FxC0kFLEKqzBG6LjJr lsUA== 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=HysbYS4JXNpNGd+evY6MK4Qvw5qa0wAO09QKKEEWVFs=; b=GqkC8zCHUu/Z1mPzM7j3Bn2AbTmPETwoAvlkQvTIYHb30tDZzL+3karBqacSZ56FRw 1YCUuRie3U6zH3+n27iaU/7f90jNUExCMhJ4R/HsXSm9z4s6xsOjl3Aaj9z8/ZQMWDM6 liKmmrvcljHsHMstQJuZ91B+vGfSlSp2FC1/Re5zSijj3pESzOeQsvcC8WziukQGVWEl 3ftcJSaLwEZc2+1i+bhosvYejBLm+/b/o9o13zjPKLJ8IPGOsSsckCcoOnRDzDUy1n4W xa++8fMh/XG3ESHXrML/xrJUUaiY6ijFBU87CELLG3vT8jz+CvmamH00ernco3qj9Lll nB7A== X-Gm-Message-State: ABUngvflODDyPS0gWyebHdcDTrdT6oK56Vk/l70JlUj3PQemSBRkjVSIwLsjvRXWH4Yng9tkU+Y1TJQnJ0R2iQ== X-Received: by 10.36.54.135 with SMTP id l129mr7203687itl.58.1479296305157; Wed, 16 Nov 2016 03:38:25 -0800 (PST) MIME-Version: 1.0 Received: by 10.64.135.230 with HTTP; Wed, 16 Nov 2016 03:38:24 -0800 (PST) In-Reply-To: References: Date: Wed, 16 Nov 2016 19:38:24 +0800 Message-ID: To: Joe Watkins Cc: PHP Internals 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) I'm referring to PHP-FPM, what about that? On Wed, Nov 16, 2016 at 7:08 PM, Joe Watkins wrote: > Morning, > > Ordinarily, we don't parse that stuff, because the server communicates via > CGI/FCGI or some other server specific interface (apache). > > The CLI server does though, I'd look there for inspiration ... there's also > an HTTP parser included in there ... > > Cheers > Joe > > On Wed, Nov 16, 2016 at 10:50 AM, 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