Added Request::format function to get a human-friendly format string for the request.
merge 4.0 and fix conflicts.