mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
resolv-replace causes problems on everything except Linux. Win32 seems to have issues with binding to 0.0.0.0
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@183 19e92222-5c0b-0410-8929-a290d50e31e9
This commit is contained in:
parent
6ed31f8d2a
commit
72caf1dd08
3 changed files with 5 additions and 5 deletions
|
@ -10,7 +10,7 @@ require 'mongrel/tcphack'
|
|||
require 'yaml'
|
||||
require 'time'
|
||||
require 'rubygems'
|
||||
require 'resolv-replace'
|
||||
|
||||
|
||||
begin
|
||||
require 'sendfile'
|
||||
|
|
|
@ -6,10 +6,10 @@ include Mongrel
|
|||
|
||||
class HttpParserTest < Test::Unit::TestCase
|
||||
def setup
|
||||
@h = HttpServer.new('0.0.0.0', 3001)
|
||||
@h = HttpServer.new('127.0.0.1', 3501)
|
||||
@h.register('/', Mongrel::DirHandler.new('.'))
|
||||
@h.run
|
||||
|
||||
|
||||
@http = Net::HTTP.new(@h.host, @h.port)
|
||||
|
||||
# get the ETag and Last-Modified headers
|
||||
|
|
|
@ -18,12 +18,12 @@ end
|
|||
class WSTest < Test::Unit::TestCase
|
||||
|
||||
def test_simple_server
|
||||
h = HttpServer.new("0.0.0.0", 9998)
|
||||
h = HttpServer.new("127.0.0.1", 9998)
|
||||
tester = TestHandler.new
|
||||
h.register("/test", tester)
|
||||
h.run
|
||||
|
||||
sleep(1)
|
||||
sleep(3)
|
||||
res = Net::HTTP.get(URI.parse('http://localhost:9998/test'))
|
||||
assert res != nil, "Didn't get a response"
|
||||
assert tester.ran_test, "Handler didn't really run"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue