lib/raygun/client.rb in raygun4ruby-2.4.0 vs lib/raygun/client.rb in raygun4ruby-2.4.1
- old
+ new
@@ -138,10 +138,10 @@
input = rack_env['rack.input']
return if request.get?
# If size is 0 the buffer is at best empty and at worst
# something like the Puma::NullIO buffer which is missing methods
- if input && input.size && !request.form_data?
+ if input && input.size && input.respond_to?(:pos) && !request.form_data?
current_position = input.pos
input.rewind
body = (input.read || '').slice(0, 4096)
input.seek(current_position)