fixed detection of sinatra request