'Initialize this L{twisted.web.distrib.Request} based on the copied
state so that it closely resembles a L{twisted.web.server.Request}.'

def setCopyableState(self, state):

    for k in ('host', 'client'):
        tup = state[k]
        addrdesc = {'INET': 'TCP', 'UNIX': 'UNIX'}[tup[0]]
        addr = {'TCP': (lambda : address.IPv4Address(addrdesc, tup[1], tup[2])), 'UNIX': (lambda : address.UNIXAddress(tup[1]))}[addrdesc]()
        state[k] = addr
    state['requestHeaders'] = Headers(dict(state['requestHeaders']))
    pb.RemoteCopy.setCopyableState(self, state)
    self.content = BytesIO(self.content_data)
    self.finish = self.remote.remoteMethod('finish')
    self.setHeader = self.remote.remoteMethod('setHeader')
    self.addCookie = self.remote.remoteMethod('addCookie')
    self.setETag = self.remote.remoteMethod('setETag')
    self.setResponseCode = self.remote.remoteMethod('setResponseCode')
    self.setLastModified = self.remote.remoteMethod('setLastModified')
    self._write = self.remote.remoteMethod('write')
