summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2014-07-15 20:56:37 (GMT)
committerNirbheek Chauhan <nirbheek@centricular.com>2014-07-15 20:57:22 (GMT)
commit8f9d869e8242312c65419d85bc23f4a6748edd0f (patch)
tree42c5f0bc832136234356247ea4e4bf1fa5c76d80
parent5885bbab8a235f1bc797487b459055f2b98cd433 (diff)
downloadsoup-transcoding-proxy-8f9d869e8242312c65419d85bc23f4a6748edd0f.zip
soup-transcoding-proxy-8f9d869e8242312c65419d85bc23f4a6748edd0f.tar.gz
main: Remove a few more assertions
-rw-r--r--src/main.c16
1 files 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:
{