From 8f9d869e8242312c65419d85bc23f4a6748edd0f Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Wed, 16 Jul 2014 02:26:37 +0530 Subject: main: Remove a few more assertions --- src/main.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/main.c b/src/main.c index f096176..c489f55 100644 --- a/src/main.c +++ b/src/main.c @@ -219,10 +219,10 @@ handle_request_cb (SoupServer *server, goto PUT; else if (msg->method == SOUP_METHOD_GET) goto GET; - else - /* We return NOT_IMPLEMENTED for this - * when we get the request headers */ - g_assert_not_reached (); + else { + soup_message_set_status (msg, SOUP_STATUS_NOT_IMPLEMENTED); + return; + } PUT: { @@ -545,10 +545,10 @@ PUT: { case SOUP_ENCODING_UNRECOGNIZED: case SOUP_ENCODING_NONE: case SOUP_ENCODING_BYTERANGES: - g_critical ("Unknown encoding!\n"); + g_critical ("Unknown encoding!"); goto out; default: - g_assert_not_reached (); + g_critical ("Unsupported encoding?"); } /* Whether the incoming stream is chunked or fixed length, we want to @@ -656,9 +656,7 @@ request_read_cb (SoupServer *server, else if (msg->method == SOUP_METHOD_GET) goto GET; else - /* We return NOT_IMPLEMENTED for this - * when we get the request headers */ - g_assert_not_reached (); + return; PUT: { -- cgit v0.11.2-2-gd1dd