rygel r391 - trunk/src/rygel
- From: zeeshanak svn gnome org
- To: svn-commits-list gnome org
- Subject: rygel r391 - trunk/src/rygel
- Date: Thu, 25 Dec 2008 12:01:45 +0000 (UTC)
Author: zeeshanak
Date: Thu Dec 25 12:01:45 2008
New Revision: 391
URL: http://svn.gnome.org/viewvc/rygel?rev=391&view=rev
Log:
Streamer only adds headers if values provided by MediaItem.
Modified:
trunk/src/rygel/rygel-streamer.vala
Modified: trunk/src/rygel/rygel-streamer.vala
==============================================================================
--- trunk/src/rygel/rygel-streamer.vala (original)
+++ trunk/src/rygel/rygel-streamer.vala Thu Dec 25 12:01:45 2008
@@ -171,9 +171,14 @@
private void add_item_headers (Soup.Message msg,
MediaItem item) {
- msg.response_headers.append ("Content-Type", item.res.mime_type);
- msg.response_headers.append ("Content-Length",
- item.res.size.to_string ());
+ if (item.res.mime_type != null) {
+ msg.response_headers.append ("Content-Type", item.res.mime_type);
+ }
+
+ if (item.res.size >= 0) {
+ msg.response_headers.append ("Content-Length",
+ item.res.size.to_string ());
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]