Skip to content

Conversation

@clue
Copy link
Member

@clueclue commented Jul 6, 2020

This changeset adds a new StreamingRequestMiddleware to stream incoming requests and marks the existing StreamingServer as internal:

// unchanged: Server class is unchanged$server = newReact\Http\Server($handler); // old: advanced StreamingServer is now internal only$server = newReact\Http\StreamingServer($handler); // new: use StreamingRequestMiddleware instead of StreamingServer$server = newReact\Http\Server(array( newReact\Http\Middleware\StreamingRequestMiddleware(), $handler ));

I've tried to keep the changeset as minimal as possible and most changes are in fact documentation only. See also each individual commit. Among others, this allows us to streamline the documentation and will allow us to improve default buffering behavior as discussed in #365/#360 and others. This will be filed as a follow-up PR once this PR is in.

Resolves#343

@clueclue added this to the v1.0.0 milestone Jul 6, 2020
@clueclue requested review from WyriHaximus and jsorJuly 6, 2020 20:21
clue added 2 commits July 7, 2020 08:54
This middleware can be used to process incoming requests with a streaming request body (without buffering). This will replace the existing `StreamingServer` class.
@clue
Copy link
MemberAuthor

clue commented Jul 7, 2020

@jsor Thanks for spotting, updated :shipit:

jsor
jsor approved these changes Jul 7, 2020
@jsorjsor merged commit e4a81c1 into reactphp:masterJul 7, 2020
@clueclue deleted the streaming branch July 7, 2020 14:23
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace advanced StreamingServer with StreamingRequestMiddleware

3 participants

@clue@jsor@WyriHaximus