rygel r679 - trunk/src/rygel



Author: zeeshanak
Date: Sun Mar 15 19:02:54 2009
New Revision: 679
URL: http://svn.gnome.org/viewvc/rygel?rev=679&view=rev

Log:
Minor optimization.

No need to keep checking if transcode_target is null.

Modified:
   trunk/src/rygel/rygel-http-request.vala

Modified: trunk/src/rygel/rygel-http-request.vala
==============================================================================
--- trunk/src/rygel/rygel-http-request.vala	(original)
+++ trunk/src/rygel/rygel-http-request.vala	Sun Mar 15 19:02:54 2009
@@ -151,16 +151,19 @@
         if (this.transcode_target != null) {
             this.msg.response_headers.append ("Content-Type",
                                               this.transcode_target);
-        } else if (this.item.mime_type != null) {
+            return;
+        }
+
+        if (this.item.mime_type != null) {
             this.msg.response_headers.append ("Content-Type",
                                               this.item.mime_type);
         }
 
-        if (this.item.size >= 0 && this.transcode_target == null) {
+        if (this.item.size >= 0) {
             this.msg.response_headers.set_content_length (this.item.size);
         }
 
-        if (this.item.size > 0 && this.transcode_target == null) {
+        if (this.item.size > 0) {
             int64 first_byte;
             int64 last_byte;
 



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