Skip to content

Commit

Permalink
Revert "Remove the workaround for JRUBY-6136"
Browse files Browse the repository at this point in the history
This reverts commit 8bb4854.
  • Loading branch information
Hiroshi Nakamura committed Oct 10, 2012
1 parent bcfd58d commit b590347
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/test_httpclient.rb
Expand Up @@ -748,6 +748,19 @@ def test_post_with_file
end
end

def test_post_with_file_without_size
STDOUT.sync = true
File.open(__FILE__) do |file|
def file.size
# Simulates some strange Windows behaviour
raise SystemCallError.new "Unknown Error (20047)"
end
assert_nothing_raised do
@client.post(serverurl + 'servlet', {1=>2, 3=>file})
end
end
end

def test_post_with_io # streaming, but not chunked
myio = StringIO.new("X" * (HTTP::Message::Body::DEFAULT_CHUNK_SIZE + 1))
def myio.read(*args)
Expand Down

0 comments on commit b590347

Please sign in to comment.