[libsoup] [SoupServer] Avoid a harmless g_return_if_fail



commit 9a24f702cc5c9363a456b5288a1421b94d8d24bc
Author: Dan Winship <danw gnome org>
Date:   Sat Jan 23 15:39:31 2010 -0500

    [SoupServer] Avoid a harmless g_return_if_fail
    
    The code to automatically handle partial GETs doesn't deal with
    streamed responses. This is fine, since you're always allowed to
    return a full response in return to a range request, but the
    code was accidentally triggering a warning in the process.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=606645

 libsoup/soup-message-server-io.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/libsoup/soup-message-server-io.c b/libsoup/soup-message-server-io.c
index 5903fe2..a75dde7 100644
--- a/libsoup/soup-message-server-io.c
+++ b/libsoup/soup-message-server-io.c
@@ -130,6 +130,8 @@ handle_partial_get (SoupMessage *msg)
 					      &ranges, &nranges))
 		return;
 
+	if (!soup_message_body_get_accumulate (msg->response_body))
+		return;
 	full_response = soup_message_body_flatten (msg->response_body);
 	if (!full_response)
 		return;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]