openstreetmap-website
https://github.com/openstreetmap/openstreetmap-website
Ruby
The Rails application that powers OpenStreetMap
ApplicationController#fetch_body
Unfortunately if a PUT or POST request that has a body fails to read it then Apache will sometimes fail to return the response it is given to the client properly, instead erroring: https://issues.apache.org/bugzilla/show_bug.cgi?id=44782 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.
Edit
git clone [email protected]:openstreetmap/openstreetmap-website.git
cd openstreetmap-website
open app/controllers/application_controller.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-ApplicationController-fetch_body-for-pr
# Commit to gitgit add app/controllers/application_controller.rbgit commit -m "better docs for ApplicationController#fetch_body"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-ApplicationController-fetch_body-for-pr
hub pull-request
# Celebrate!