uwsgi-phpsgi icon indicating copy to clipboard operation
uwsgi-phpsgi copied to clipboard

Implement request body handling

Open unbit opened this issue 10 years ago • 10 comments

Maybe

$env->read($amount);

will be more than enough

unbit avatar Feb 10 '15 09:02 unbit

It is better to use the pecl module HTTP http://devel-m6w6.rhcloud.com/mdref/http/Env

ParkFramework avatar Feb 11 '15 14:02 ParkFramework

Well, it would really ease the interaction between the script and the server, but it’s also an extra dependency. My personal opinion is that the Request/Response objects should be constructed by the web application itself. However, TBH, I am not really confident on which is better.

WST avatar Feb 11 '15 16:02 WST

Ok, then it must be PSR-7 https://github.com/php-fig/fig-standards/blob/master/proposed/http-message.md

ParkFramework avatar Feb 11 '15 17:02 ParkFramework

:+1: for PSR-7

bazilio91 avatar Feb 11 '15 19:02 bazilio91

Interesting (i mean PSR-7) implementing it could be a good start (and path to follow)

unbit avatar Feb 11 '15 19:02 unbit

Looks like PSR-7 is ready to use https://mwop.net/blog/2015-01-26-psr-7-by-example.html

bazilio91 avatar Feb 11 '15 22:02 bazilio91

Never heard of PSR-7 (and the whole FIG initiative), but it looks good and promising, thanks for sharing that!

WST avatar Feb 11 '15 23:02 WST

PSR-7 passed https://groups.google.com/forum/#!topic/php-fig/0baLqR6Rvcg

bazilio91 avatar May 13 '15 07:05 bazilio91

Ok, so the best thing to do now is minimize the c api (to the real possible minimum) and implement the psr-7 interface on top of it (directly in php in a way similar to what we did with pypy)

unbit avatar May 13 '15 07:05 unbit

Anyway, is there any ETA on ability to handle request body?

WST avatar May 13 '15 08:05 WST