Skip to content

Conversation

@danp60
Copy link

@danp60 danp60 commented Apr 9, 2014

The thrift representation of an empty array is the same as null, so when the body is empty (such as with a HeadSync), the current implementation of Execute will throw an exception because MemoryStream cannot handle nulls. Instead return an empty byte array. Also add integration test for this case.

The thrift representation of an empty array is the same as null, so when the body is empty (such as with a HeadSync), the current implementation of Execute will throw an exception because MemoryStream cannot handle nulls. Instead
use an empty byte array. Also add integration test for this case.
@Mpdreamz
Copy link
Member

Mpdreamz commented Apr 9, 2014

Awesome @danp60 thanks for the Thrift love recently 👍

Mpdreamz added a commit that referenced this pull request Apr 9, 2014
Correctly handle empty response bodies in Thrift
@Mpdreamz Mpdreamz merged commit 75e29e6 into elastic:master Apr 9, 2014
@danp60 danp60 deleted the bugfix/thrift_empty_response branch May 7, 2014 00:54
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.

2 participants