Fixes test environment detection.

Since #878, `Request`'s url starts with an '/' (for a better consistency with the HTTP protocol).