[rygel] core: HTTP GET/HEAD is invalid for place-holder items



commit a13f557bc99ec43ba533286ac66a72134ea1003d
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Wed Sep 22 22:14:49 2010 +0300

    core: HTTP GET/HEAD is invalid for place-holder items

 src/rygel/rygel-http-get.vala |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/rygel/rygel-http-get.vala b/src/rygel/rygel-http-get.vala
index b994c31..87e152f 100644
--- a/src/rygel/rygel-http-get.vala
+++ b/src/rygel/rygel-http-get.vala
@@ -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;



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