Skip to content

Instantly share code, notes, and snippets.

@tamoot

tamoot/gist:626417

Created Oct 14, 2010
Embed
What would you like to do?
diff --git a/tdiary/dispatcher.rb b/tdiary/dispatcher.rb
index 5077ab3..0cb5c47 100644
--- a/tdiary/dispatcher.rb
+++ b/tdiary/dispatcher.rb
@@ -4,21 +4,13 @@ require 'stringio'
require 'tdiary'
require 'tdiary/tdiary_response'
-require 'logger'
-$logger = Logger.new("testable.txt")
-
module TDiary
class Dispatcher
class << self
# stolen from Rack::Handler::CGI.send_headers
def send_headers( status, headers )
$stdout.print "Status: #{status}\r\n"
- headers.each { |k, vs|
-$logger.info "key=>#{k}, value=>#{vs.inspect}"
- vs.split( "\n" ).each { |v|
- $stdout.print "#{k}: #{v}\r\n"
- }
- }
+ $stdout.print CGI.new.header( headers )
$stdout.print "\r\n"
$stdout.flush
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment