Skip to content

Commit 44b888f

Browse files
committed
Do not try to rewind the body of a GET request, which doesn't have one
1 parent 2c11af8 commit 44b888f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

ruby/lib/umbra.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ def reset!
5959
private
6060

6161
def request_body(env)
62+
return nil unless env.key?("rack.input")
63+
6264
io = env.fetch("rack.input")
6365
io.rewind
6466
body = io.read

ruby/spec/integration_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def publish(channel, message)
3939
expect(redis.messages.count).to eq(1)
4040
end
4141

42-
fit "publishes the expected protobuf message" do
42+
it "publishes the expected protobuf message" do
4343
post "/", "request-body"
4444

4545
sleep(0.1)

0 commit comments

Comments
 (0)