'Called by channel when all data has been received.
This method is not intended for users.
@type command: C{bytes}
@param command: The HTTP verb of this request.  This has the case
supplied by the client (eg, it maybe "get" rather than "GET").
@type path: C{bytes}
@param path: The URI of this request.
@type version: C{bytes}
@param version: The HTTP version of this request.'

def requestReceived(self, command, path, version):

    self.content.seek(0, 0)
    self.args = {}
    (self.method, self.uri) = (command, path)
    self.clientproto = version
    x = self.uri.split('?', 1)
    if (len(x) == 1):
        self.path = self.uri
    else:
        (self.path, argstring) = x
        self.args = parse_qs(argstring, 1)
    self.client = self.channel.getPeer()
    self.host = self.channel.getHost()
    args = self.args
    ctype = self.requestHeaders.getRawHeaders('content-type')
    if (ctype is not None):
        ctype = ctype[0]
    if ((self.method == 'POST') and ctype):
        mfd = 'multipart/form-data'
        (key, pdict) = _parseHeader(ctype)
        if (key == 'application/x-www-form-urlencoded'):
            args.update(parse_qs(self.content.read(), 1))
        elif (key == mfd):
            try:
                cgiArgs = cgi.parse_multipart(self.content, pdict)
                if _PY3:
                    self.args.update({x.encode('iso-8859-1'): y for (x, y) in cgiArgs.items()})
                else:
                    self.args.update(cgiArgs)
            except:
                self.channel._respondToBadRequestAndDisconnect()
                return
        self.content.seek(0, 0)
    self.process()
