tested with sinatra 1.3.4 and above