gweb: process_send_file after HTTP Header is sent
authorSébastien Bianti <sebastien.bianti@linux.intel.com>
Tue, 10 Jan 2012 09:49:16 +0000 (10:49 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 11 Jan 2012 05:12:19 +0000 (21:12 -0800)
gweb/gweb.c

index 9cf4b02..365f67c 100644 (file)
@@ -485,6 +485,9 @@ static gboolean process_send_file(struct web_session *session)
        if (session->fd == -1)
                return FALSE;
 
+       if (session->request_started == FALSE || session->more_data == TRUE)
+               return FALSE;
+
        sk = g_io_channel_unix_get_fd(session->transport_channel);
        if (sk < 0)
                return FALSE;