[openstreetmap/openstreetmap-website] Update to rack 3 (PR #5923)

Tom Hughes notifications at github.com
Tue Apr 15 11:49:32 UTC 2025


@tomhughes commented on this pull request.



> @@ -247,7 +247,7 @@ def respond_to_timeout
   # To work round this we call rewind on the body here, which is added
   # as a filter, to force it to be fetched from Apache into a file.
   def fetch_body
-    request.body.rewind
+    request.body&.rewind

Actually there may be an issue here because of https://github.com/rack/rack/blob/main/UPGRADE-GUIDE.md#rackinput-is-no-longer-required-to-be-rewindable which means the hack being perpetrated there is unlikely to work any more.

Re-reading https://bz.apache.org/bugzilla/show_bug.cgi?id=44782#c6 it seems that just closing the input stream is enough to avoid the problem, so changing to an after action handler that does that is probably a good idea.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5923#discussion_r2044344438
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/5923/review/2767950678 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250415/0971dcc0/attachment.htm>


More information about the rails-dev mailing list