also make the gemspec version based off the RELEASE version set in rack.rb so that they don't get out of sync
…zen env. Ref rack/rack#848
Currently, files with underscores are not loaded using standard ruby/rails conventions b/c of the way Object.const_get is called inside Rack::Builder.parse_file. For example, a filename 'my_example_app', will be required and then an Object.const_get('My_example_app') call will throw a NameError unless you have named your class accordingly inside the my_example_app file. This commit changes the behavior so that 'my_example_app' is required and then Object.const_get('MyExampleApp') is called. I think this is the behavior most developers would expect.
Setting the output buffer size to 5 means that we will do thousands of small writes when serving a large file, which is inefficient. This fix improves performance of the HTTP server. This resolves the slow-down referenced at rails/rails#18828
* The original code would set the flag for the duration of Rack::Lock#call and then set it back when the method finished. The problem is that the BodyProxy could be executing code that relies on the state of the flag. This change makes sure the application *and* the body proxy see the expected state of the environment.
* In the previous code if a lock is being waited on and an error was raised, such as by Rack::Timeout, the original code would attempt to unlock a mutex it does not own raising a ThreadError with the error message "Attempt to unlock a mutex which is locked by another thread" This code uses an explicit begin block that starts immediately after the mutex is locked so that when the ensure part runs we know that the mutex belongs to this thread.