[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-internals
Subject:    Re: [PHP-DEV] Ask php cli to parse HTTP request
From:       Aaron Lewis <the.warl0ck.1989 () gmail ! com>
Date:       2016-11-16 15:00:49
Message-ID: CAJZVxRmvaOwmrNKYfd2LD_Si3qM5DVHL7t0AOcELOdFkjVz6zQ () mail ! gmail ! com
[Download RAW message or body]

Thanks Marco.

But I'm looking for the C implementation ..

On Wed, Nov 16, 2016 at 8:43 PM, Marco Pivetta <ocramius@gmail.com> 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" <the.warl0ck.1989@gmail.com> 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

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic