mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
network/http-launch: Append \0 at the end of the requests to make the string functions happy
This commit is contained in:
parent
c8a308eee2
commit
dcf3da3d5d
1 changed files with 3 additions and 1 deletions
|
@ -208,8 +208,10 @@ on_read_bytes (GPollableInputStream * stream, Client * client)
|
|||
|
||||
while (client->current_message->len > 3) {
|
||||
if (tmp[0] == 0x0d && tmp[1] == 0x0a && tmp[2] == 0x0d && tmp[3] == 0x0a) {
|
||||
guint len = tmp - client->current_message->data + 4;
|
||||
guint len;
|
||||
|
||||
g_byte_array_append (client->current_message, (const guint8 *) "\0", 1);
|
||||
len = tmp - client->current_message->data + 5;
|
||||
client_message (client, (gchar *) client->current_message->data, len);
|
||||
g_byte_array_remove_range (client->current_message, 0, len);
|
||||
tmp = client->current_message->data;
|
||||
|
|
Loading…
Reference in a new issue