[csw-devel] SF.net SVN: opencsw:[405] catalog_signatures/lib/csw/gpg_daemon.rb

bdwalton at users.sourceforge.net bdwalton at users.sourceforge.net
Thu Jul 21 05:00:19 CEST 2011


Revision: 405
          http://opencsw.svn.sourceforge.net/opencsw/?rev=405&view=rev
Author:   bdwalton
Date:     2011-07-21 03:00:19 +0000 (Thu, 21 Jul 2011)

Log Message:
-----------
all of our responses will be text/plain, so remove redundant setting of the same value

Signed-off-by: Ben Walton <bwalton at artsci.utoronto.ca>

Modified Paths:
--------------
    catalog_signatures/lib/csw/gpg_daemon.rb

Modified: catalog_signatures/lib/csw/gpg_daemon.rb
===================================================================
--- catalog_signatures/lib/csw/gpg_daemon.rb	2011-07-21 02:59:48 UTC (rev 404)
+++ catalog_signatures/lib/csw/gpg_daemon.rb	2011-07-21 03:00:19 UTC (rev 405)
@@ -17,21 +17,20 @@
     tmp = File.join(@mirror_path, rest.join('.'))
     p = validate_path(rest.join('/'))
 
+    response['Content-type'] = 'text/plain'
+
     if p
       cmd = "#{@gpg} --#{mode} '#{p}'"
       content = `cmd`
       if $?.eql?(0)
         response.status = 200
-        response['Content-type'] = 'text/plain'
         response.body = content
       else
         response.status = 500
-        response['Content-type'] = 'text/plain'
         response.body = "500 There was a problem processing the request."
       end
     else
       response.status = 400
-      response['Content-type'] = 'text/plain'
       response.body = "400 Invalid request."
     end
   end


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


More information about the devel mailing list