about summary refs log tree commit homepage
path: root/examples
diff options
context:
space:
mode:
authorzedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9>2006-01-28 19:34:12 +0000
committerzedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9>2006-01-28 19:34:12 +0000
commit6a5116197a687798f1dc9b533796a8319cb82c2e (patch)
treebd791521e8515b0388b658ad8a4856e5870e28e8 /examples
parent004dec2c2f44a0db510dfd65e5ffd8c9fc4ff83e (diff)
downloadunicorn-6a5116197a687798f1dc9b533796a8319cb82c2e.tar.gz
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@9 19e92222-5c0b-0410-8929-a290d50e31e9
Diffstat (limited to 'examples')
-rw-r--r--examples/simpletest.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/simpletest.rb b/examples/simpletest.rb
index c05a745..864c226 100644
--- a/examples/simpletest.rb
+++ b/examples/simpletest.rb
@@ -2,11 +2,12 @@ require 'mongrel'
 require 'yaml'
 
 class SimpleHandler < Mongrel::HttpHandler
-    
     def process(request, response)
-      response.socket.write("HTTP/1.1 200 OK\r\nContent-Type: text/plain\r\n\r\nhello!\n")
+      response.start do |head,out|
+        head["Content-Type"] = "text/plain"
+        out.write("hello!\n")
+      end
     end
-    
 end
 
 h = Mongrel::HttpServer.new("0.0.0.0", "3000")