I ran into a weird bug the other day. Editing an attribute in a web form would kick off an XHR request to the server and update a row in the database. But when the page was refreshed, the attribute on the page had not changed from its original value. Even weirder: refreshing the page a second time caused the attribute to show up correctly—and reflect what was in the database.
I’m not going to spoil the story here, but the issue led me into the internals of Rack middleware. Join me as we explore the details of this strange bug. Together, we’ll learn something about the wonderful world of Rack.