# Docker stats API returns partial JSON

**URL:** <https://forums.docker.com/t/docker-stats-api-returns-partial-json/15067>\
**Category:** General\
**Created:** [June 9, 2016, 3:36pm UTC](https://forums.docker.com/t/docker-stats-api-returns-partial-json/15067 "2016-06-09T15:36:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wangwan](https://avatars.discourse-cdn.com/v4/letter/w/76d3ee/32.png) [@wangwan](https://forums.docker.com/u/wangwan)\
**Post date:** [June 9, 2016, 3:36pm UTC](https://forums.docker.com/t/docker-stats-api-returns-partial-json/15067/1 "2016-06-09T15:36:52Z")

</div>

Server Version: 1.11.1  
Kernel Version: 3.10.0-327.13.1.el7.x86\_64  
Operating System: Red Hat Enterprise Linux Server 7.2 (Maipo)  
OSType: linux  
Architecture: x86\_64

I have a Perl script that send stats request to socket /var/run/docker.sock: GET /containers/$id/stats?stream=0 HTTP/1.1

From time to time, I get bad response that starts with:  
cp"},{“PrivatePort”:2181,“Type”:“tcp”}],“Labels”:{“com.docker.compose.config-hash”:“d1be80f19cd5099279c35d8221a17f8f041116572025218dbcc3d39b1d04c14f”,“com.docker.compose.container-number”:“1”,…

It doesn’t even have the proper HTTP response header
