Skip to content

Add StreamingRequestMiddleware to stream incoming requests, mark StreamingServer as internal - #367

Merged
jsor merged 3 commits into
reactphp:masterfrom
clue-labs:streaming
Jul 7, 2020
Merged

Add StreamingRequestMiddleware to stream incoming requests, mark StreamingServer as internal#367
jsor merged 3 commits into
reactphp:masterfrom
clue-labs:streaming

Conversation

@clue

@clueclue commented Jul 6, 2020

Copy link
Copy Markdown
Member

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
@clue
clue requested review from WyriHaximus and jsorJuly 6, 2020 20:21
Comment threadREADME.md Outdated
Comment threadREADME.md Outdated
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

clue commented Jul 7, 2020

Copy link
Copy Markdown
MemberAuthor

@jsor Thanks for spotting, updated :shipit:

jsor
jsor approved these changes Jul 7, 2020
@jsor
jsor merged commit e4a81c1 into reactphp:masterJul 7, 2020
@clue
clue 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