fix an issue parsing uri's from clients

Fix #2965. @ussuri
Well, you know I like regexps :) So this could be just:

static final _REQUEST_RE = new RegExp(r'(.+)\?(.+)?');
...
Match match = _REQUEST_RE.matchAsPrefix(strs[1]);
String file = match.group(1);
String query = match.group(2); // automatically converts a missing query to null

No critical, of course.