diff options
Diffstat (limited to 'test/http_put.rb')
-rw-r--r-- | test/http_put.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/http_put.rb b/test/http_put.rb index 21d65c7..0479629 100644 --- a/test/http_put.rb +++ b/test/http_put.rb @@ -160,6 +160,17 @@ class TestHTTPPut < Test::Unit::TestCase assert( ! File.exist?("#@tmpdir/dev666/foo") ) end + def test_put_bogus + max = 0xffffffff << 64 + req = "PUT /dev666/foo HTTP/1.1\r\n" \ + "Transfer-Encoding: bogus\r\n" \ + "\r\n" + @client.write(req) + resp = @client.read + assert_match(%r{\AHTTP/1\.1 400 Bad Request\r\n}, resp) + assert( ! File.exist?("#@tmpdir/dev666/foo") ) + end + def test_put_range_beg_overflow max = 0xffffffff << 64 req = "PUT /dev666/foo HTTP/1.1\r\n" \ |