Skip to content

Emit end event for requests without body - #136

Merged
WyriHaximus merged 2 commits into
reactphp:masterfrom
legionth:handle-simple-requests
Mar 3, 2017
Merged

Emit end event for requests without body#136
WyriHaximus merged 2 commits into
reactphp:masterfrom
legionth:handle-simple-requests

Conversation

@legionth

Copy link
Copy Markdown
Contributor

Currently only requests with a body will emit the end event ( #116 and #129).

This ensures that a completed request without a body (e.g. GET-Request) will emit an end event.

Comment threadsrc/Server.php Outdated
$request->emit('end');
$request->close();
return;
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Emitting events on another instance should generally be avoided. Also, this looks somewhat similar to the code below, perhaps this can/should be unified?

@clueclue added this to the v0.6.0 milestone Mar 2, 2017
@legionth
legionthforce-pushed the handle-simple-requests branch from 0df5dc8 to 26fb646CompareMarch 2, 2017 15:34
@legionth

Copy link
Copy Markdown
ContributorAuthor

Ping @clue have a look at this new approach.

clue
clue approved these changes Mar 2, 2017

@clueclue left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, LGTM! 👍

jsor
jsor approved these changes Mar 3, 2017
@WyriHaximus
WyriHaximus merged commit 65052b4 into reactphp:masterMar 3, 2017
@clueclue mentioned this pull request Mar 7, 2017
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@legionth@jsor@WyriHaximus@clue