In Resource::getExceptionHttpHeaders() use Request::BuildFromGlobals
Fix str_replace call in Request class