Web.CGI.Request: rest_query may be zero. Fixes [bug 6685].

Thanks to Piotr Smyrak <piotr.smyrak@gmail.com> for the report.