From ddc2de54664ec25b95bbce997fbbb6a7104f1203 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sat, 10 Nov 2012 23:52:21 +0000 Subject: Very immature code for reading from the streaming API. It reads from a fixed URL and tried to parse individual JSON objects. Not doing anything useful with it. --- lib/http_client.c | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/http_client.c') diff --git a/lib/http_client.c b/lib/http_client.c index 17e21a49..acbf230c 100644 --- a/lib/http_client.c +++ b/lib/http_client.c @@ -281,6 +281,7 @@ static gboolean http_incoming_data( gpointer data, int source, b_input_condition memcpy( req->sbuf + req->sblen, buffer, st ); req->bytes_read += st; req->sblen += st; + req->sbuf[req->sblen] = '\0'; req->reply_body = req->sbuf + pos; req->body_size = req->sblen - pos; } -- cgit v1.2.3