<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,4 +1,5 @@
 == 1.0.1 ? release
+ * Defaults SERVER_NAME to localhost like webrick does [#87 state:resolved]
  * Namespace parser to prevent error when mongrel is required [cliffmoon]
  * Set RACK_ENV based on environment option when loading rackup file [Curtis Summers] [#83 state:resolved]
  * Fixes a warning RE relative_url_root when using a prefix with Rails 2.1.1 [seriph] [#85 state:resolved]</diff>
      <filename>CHANGELOG</filename>
    </modified>
    <modified>
      <diff>@@ -16,6 +16,8 @@ module Thin
 
     # Freeze some HTTP header names &amp; values
     SERVER_SOFTWARE   = 'SERVER_SOFTWARE'.freeze
+    SERVER_NAME       = 'SERVER_NAME'.freeze
+    LOCALHOST         = 'localhost'.freeze
     HTTP_VERSION      = 'HTTP_VERSION'.freeze
     HTTP_1_0          = 'HTTP/1.0'.freeze
     REMOTE_ADDR       = 'REMOTE_ADDR'.freeze
@@ -49,6 +51,7 @@ module Thin
       @body     = StringIO.new
       @env      = {
         SERVER_SOFTWARE   =&gt; SERVER,
+        SERVER_NAME       =&gt; LOCALHOST,
 
         # Rack stuff
         RACK_INPUT        =&gt; @body,</diff>
      <filename>lib/thin/request.rb</filename>
    </modified>
    <modified>
      <diff>@@ -59,7 +59,7 @@ describe Request, 'parser' do
   it 'should parse headers from GET request' do
     request = R(&lt;&lt;-EOS, true)
 GET / HTTP/1.1
-Host: localhost:3000
+Host: myhost.com:3000
 User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.9) Gecko/20071025 Firefox/2.0.0.9
 Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
 Accept-Language: en-us,en;q=0.5
@@ -70,8 +70,8 @@ Keep-Alive: 300
 Connection: keep-alive
 
 EOS
-    request.env['HTTP_HOST'].should == 'localhost:3000'
-    request.env['SERVER_NAME'].should == 'localhost'
+    request.env['HTTP_HOST'].should == 'myhost.com:3000'
+    request.env['SERVER_NAME'].should == 'myhost.com'
     request.env['SERVER_PORT'].should == '3000'
     request.env['HTTP_COOKIE'].should == 'mium=7'
 
@@ -195,4 +195,9 @@ EOS
   it &quot;should fails on heders larger then MAX_HEADER&quot; do
     proc { R(&quot;GET / HTTP/1.1\r\nFoo: #{'X' * Request::MAX_HEADER}\r\n\r\n&quot;) }.should raise_error(InvalidRequest)
   end
+  
+  it &quot;should default SERVER_NAME to localhost&quot; do
+    request = R(&quot;GET / HTTP/1.1\r\n\r\n&quot;)
+    request.env['SERVER_NAME'].should == &quot;localhost&quot;
+  end
 end
\ No newline at end of file</diff>
      <filename>spec/request/parser_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>6ac518fe765517fc0b5b39ce5d72bf6671f0a1eb</id>
    </parent>
  </parents>
  <author>
    <name>macournoyer</name>
    <email>macournoyer@gmail.com</email>
  </author>
  <url>http://github.com/macournoyer/thin/commit/7c8e416848e2dfc8f1fb594997be640cf8f398b2</url>
  <id>7c8e416848e2dfc8f1fb594997be640cf8f398b2</id>
  <committed-date>2008-12-16T18:05:54-08:00</committed-date>
  <authored-date>2008-12-16T18:05:54-08:00</authored-date>
  <message>Defaults SERVER_NAME to localhost like webrick does [#87 state:resolved]</message>
  <tree>7571731c2546d62021493999734293f618c70d64</tree>
  <committer>
    <name>macournoyer</name>
    <email>macournoyer@gmail.com</email>
  </committer>
</commit>
