fixes for ruby 2.0
fixes for latest version of ruby and Rack
adding some headers for operation behind proxies