GenieACS and HTTP

Zaid Abdulla zaid at genieacs.com
Fri Mar 20 12:10:40 EDT 2015


On Wed, Mar 18, 2015, at 04:30 PM, Dave whoohoo wrote:
> Hey,
> 
> I am writing my own script that should retrieve all information from the CPEs. At first, the responses were of a type "connection:close" and were fully correct. But I do not want this, since I may need to send a lot of requests and I do not want to set up a new socket every time. 

In my tests I'm getting "Connection: keep-alive" response headers. What
version of nodejs are you using?

> For this reason I created a persistent connection between my code and the ACS.
> However, in the persistent connection the ACS adds some weird characters to the JSON replies. I also get these characters in wireshark, which means that it is not my script that reads the responses incorrectly.
>  
> The content contains:
> 2
> [
> 
> 5 hexadecimal characters (or at least they seem to be hexadecimal)
> JSON string

Looks like ordinary chucked-encoded response. Make sure your client
script recognizes chunked responses.

Zaid


More information about the Users mailing list