Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure the first bit of body directly after the headers is emitted into the stream #68

Merged
merged 2 commits into from Oct 28, 2016

Conversation

WyriHaximus
Copy link
Member

Fixes #67

…ers not emitted from the stream but from the response never making it into the stream
@WyriHaximus
Copy link
Member Author

Ping @jsor @clue for review, I've already send @uniquoooo the code change last night and he confirm from his end that this fixes the problem. When debugging I got a different error though but same the same underlying cause: Chunk length header longer then 1024 bytes

@@ -156,7 +156,7 @@ public function handleData($data)

$this->emit('response', array($response, $this));

$response->emit('data', array($bodyChunk, $response));
$this->stream->emit('data', array($bodyChunk, $response));
Copy link
Member

Choose a reason for hiding this comment

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

$response can / should be omitted here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Check you're right it should be omitted there, the data will flow through the stream to the response and the response will emit it again when data comes from the stream 👍

Copy link
Member

@jsor jsor left a comment

Choose a reason for hiding this comment

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

LGTM :shipit:

Copy link
Member

@clue clue left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@WyriHaximus WyriHaximus merged commit 243015b into reactphp:master Oct 28, 2016
@WyriHaximus WyriHaximus deleted the fix-for-67 branch October 28, 2016 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants