core: HTTP GET/HEAD is invalid for place-holder items
authorZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Wed, 22 Sep 2010 19:14:49 +0000 (22:14 +0300)
committerZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Wed, 22 Sep 2010 20:24:40 +0000 (23:24 +0300)
src/rygel/rygel-http-get.vala

index b994c31..87e152f 100644 (file)
@@ -78,6 +78,11 @@ internal class Rygel.HTTPGet : HTTPRequest {
     protected override async void find_item () throws Error {
         yield base.find_item ();
 
+        if (unlikely (this.item.size == 0)) {
+            throw new HTTPRequestError.NOT_FOUND ("Item '%s' is empty",
+                                                  this.item.id);
+        }
+
         if (this.uri.thumbnail_index >= 0) {
             if (this.item is MusicItem) {
                 var music = this.item as MusicItem;