Skip to content

Commit

Permalink
Rewind request.body only when possible
Browse files Browse the repository at this point in the history
  • Loading branch information
ashmaroli committed Dec 12, 2024
1 parent b64e648 commit d6858bb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/jekyll-admin/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,9 @@ def document_body

def request_body
@request_body ||= begin
request.body.rewind
request.body.read
rq_bdy = request.body
rq_bdy.rewind if rq_bdy.respond_to?(:rewind)
rq_bdy.read
end
end

Expand Down

0 comments on commit d6858bb

Please sign in to comment.