Commit e205bb9
Daniel Low
Correctly handle empty response bodies.
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.1 parent 9486a09 commit e205bb9
File tree
2 files changed
+13
-2
lines changed- src
- Connections/Elasticsearch.Net.Connection.Thrift
- Tests/Nest.Tests.Integration/Connection/Thrift
2 files changed
+13
-2
lines changedLines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
277 | | - | |
| 277 | + | |
278 | 278 | | |
279 | 279 | | |
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
283 | | - | |
| 283 | + | |
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
| |||
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
29 | 40 | | |
30 | 41 | | |
0 commit comments