--- a/test/TC_Swiftiply.rb 2013-05-02 21:00:13.053613758 +0200 +++ b/test/TC_Swiftiply.rb 2013-05-02 21:07:21.803575787 +0200 @@ -534,28 +534,28 @@ # Normal request response = get_url('127.0.0.1',29998,'/xyzzy') - assert_equal("GET /xyzzy HTTP/1.1\r\nAccept: */*\r\nHost: 127.0.0.1:29998\r\n\r\n",response.body) + assert_equal("GET /xyzzy HTTP/1.1",response.body[0..18]) # With query string params. response = get_url('127.0.0.1',29998,'/foo/bar/bam?Q=1234') - assert_equal("GET /foo/bar/bam?Q=1234 HTTP/1.1\r\nAccept: */*\r\nHost: 127.0.0.1:29998\r\n\r\n",response.body) + assert_equal("GET /foo/bar/bam?Q=1234 HTTP/1.1",response.body[0..31]) # POST request response = post_url('127.0.0.1',29998,'/xyzzy') - assert_equal("POST /xyzzy HTTP/1.1\r\nAccept: */*\r\nHost: 127.0.0.1:29998\r\n\r\n",response.body) + assert_equal("POST /xyzzy HTTP/1.1",response.body[0..19]) # And another verb; different verbs should be irrelevant response = delete_url('127.0.0.1',29998,'/xyzzy') - assert_equal("DELETE /xyzzy HTTP/1.1\r\nAccept: */*\r\n",response.body[0..36]) + assert_equal("DELETE /xyzzy HTTP/1.1",response.body[0..21]) # A non-matching hostname, to trigger default handling response = get_url('localhost',29998,'/xyzzy') - assert_equal("GET /xyzzy HTTP/1.1\r\nAccept: */*\r\nHost: localhost:29998\r\n\r\n",response.body) + assert_equal("GET /xyzzy HTTP/1.1",response.body[0..18]) # A very large url u = '/abcdefghijklmnopqrstuvwxyz'*100 response = get_url('127.0.0.1',29998,u) - assert_equal("GET #{u} HTTP/1.1\r\nAccept: */*\r\nHost: 127.0.0.1:29998\r\n\r\n",response.body) + assert_equal("GET #{u} HTTP/1.1",response.body[0..2712]) end # Test redeployable requests. @@ -596,7 +596,7 @@ end urlthread.join - assert_equal("GET /slo_gin_fizz HTTP/1.1\r\nAccept: */*\r\nHost: 127.0.0.1:29998\r\n\r\n",response.body) + assert_equal("GET /slo_gin_fizz HTTP/1.1",response.body[0..25]) sleep 1 @@ -665,7 +665,7 @@ # Normal request response = get_url('127.0.0.1',29998,'/xyzzy') - assert_equal("GET /xyzzy HTTP/1.1\r\nAccept: */*\r\nHost: 127.0.0.1:29998\r\n\r\n",response.body) + assert_equal("GET /xyzzy HTTP/1.1", response.body[0..18]) end def test_http_404_error @@ -846,7 +846,7 @@ # Normal request for a sanity check. response = get_url('127.0.0.1',29998,'/xyzzy') - assert_equal("GET /xyzzy HTTP/1.1\r\nAccept: */*\r\nHost: 127.0.0.1:29998\r\n\r\n",response.body) + assert_equal("GET /xyzzy HTTP/1.1",response.body[0..18]) # Now rewrite the conf file to be a little different. File.open(conf_file,'w+') {|fh| fh.write ConfBase.to_yaml }