Titanium JIRA Archive
Appcelerator Daemon (DAEMON)

[DAEMON-271] Error streaming object responses to HTTP clients

GitHub Issuen/a
TypeBug
PriorityHigh
StatusResolved
ResolutionFixed
Resolution Date2019-02-14T23:16:58.000+0000
Affected Version/sn/a
Fix Version/sAppc Daemon 2.0.0
Componentsappcd-dispatcher
Labelsn/a
ReporterChris Barber
AssigneeChris Barber
Created2019-02-14T21:13:20.000+0000
Updated2019-02-14T23:16:58.000+0000

Description

When a request is made to a service from an HTTP client, such as curl, that streams an object response, the dispatcher context's response stream is eventually piped into Koa's HTTP server's response stream which expects streamed chunks to be either strings or buffers. When an object is streamed, an error is thrown. The solution is to stringify the object before it gets piped to the server response.

Comments

  1. Chris Barber 2019-02-14

    https://github.com/appcelerator/appc-daemon/pull/352

JSON Source