<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -28,6 +28,18 @@ module BasicTests
       assert_equal 200, response['status']
     end
   end
+
+  def test_last_header
+    response = get(&quot;/bytes/123&quot;, {
+      &quot;Hello&quot; =&gt; &quot;World&quot;,
+      &quot;Something&quot; =&gt; &quot;Else&quot;,
+      &quot;Content-Length&quot; =&gt; &quot;0&quot;
+    })
+    assert_equal 200, response['status'] 
+    assert_equal &quot;World&quot;, response['HTTP_HELLO']
+    assert_equal &quot;Else&quot;, response['HTTP_SOMETHING']
+    assert_equal 0, response['CONTENT_LENGTH']
+  end
 end
 
 class BasicTest &lt; ServerTest</diff>
      <filename>test/basic_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -49,19 +49,10 @@ class HelperApp
   end
 end
 
-class Test::Unit::TestCase
-  def get(path)
-    response = Net::HTTP.get_response(URI.parse(&quot;http://0.0.0.0:#{TEST_PORT}#{path}&quot;))
-  end
-  
-  def post(path, data)
-    response = Net::HTTP.post_form(URI.parse(&quot;http://0.0.0.0:#{TEST_PORT}#{path}&quot;), data)
-  end
-end
-
 class ServerTest &lt; Test::Unit::TestCase
-  def get(path)
-    response = Net::HTTP.get_response(URI.parse(&quot;http://0.0.0.0:#{TEST_PORT}#{path}&quot;))
+  def get(path, headers=nil)
+    h = Net::HTTP.new('127.0.0.1', TEST_PORT)
+    response = h.get(path, headers)
     env = JSON.parse(response.body)
   end
 
@@ -99,9 +90,11 @@ class ServerTestFD &lt; ServerTest
 end
 
 class ServerTestSocket &lt; ServerTest
-  def get(path)
+  def get(path, headers = {})
     socket = UNIXSocket.open(@socketfile)
-    socket.write(&quot;GET #{path} HTTP/1.0\r\n\r\n&quot;)
+    socket.write(&quot;GET #{path} HTTP/1.0\r\n&quot;)
+    headers.each_pair { |field, value| socket.write(&quot;#{field}: #{value}\r\n&quot;) }
+    socket.write(&quot;\r\n&quot;)
     response = &quot;&quot;
     while chunk = socket.read(100)
       response &lt;&lt; chunk</diff>
      <filename>test/helper.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>dae3f8388323cca28ec1b8df8c235e9c5b1282e1</id>
    </parent>
  </parents>
  <author>
    <name>Ryan</name>
    <email>ry@tinyclouds.org</email>
  </author>
  <url>http://github.com/ry/ebb/commit/64ca0e0dbfaba60167b8ffa3c575fe112ef3aaf0</url>
  <id>64ca0e0dbfaba60167b8ffa3c575fe112ef3aaf0</id>
  <committed-date>2008-10-04T09:42:03-07:00</committed-date>
  <authored-date>2008-10-04T09:42:03-07:00</authored-date>
  <message>add an additional test to test last header inclusion</message>
  <tree>561582922fc44a699bbe8c92be42dc615dc828ea</tree>
  <committer>
    <name>Ryan</name>
    <email>ry@tinyclouds.org</email>
  </committer>
</commit>
