[rygel] core: Throw error on invalid URI



commit ce4a6b5092bca2b2b263b16118c8a022f589ba15
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Mon Dec 28 18:12:32 2009 +0200

    core: Throw error on invalid URI

 src/rygel/rygel-http-item-uri.vala |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/src/rygel/rygel-http-item-uri.vala b/src/rygel/rygel-http-item-uri.vala
index 268001c..12683e1 100644
--- a/src/rygel/rygel-http-item-uri.vala
+++ b/src/rygel/rygel-http-item-uri.vala
@@ -41,9 +41,8 @@ internal class Rygel.HTTPItemURI : Object {
         var parts = request_uri.split ("/");
 
         if (parts.length < 2 || parts.length % 2 == 0) {
-            warning ("Invalid uri %s", request_uri);
-
-            return;
+            throw new HTTPRequestError.BAD_REQUEST ("Invalid URI '%s'",
+                                                    request_uri);
         }
 
         for (int i = 1; i < parts.length - 1; i += 2) {



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