def METHOD_NAME(self, request):
    kw = {}
    hasEmptyLine = False
    for line in request.written.splitlines():
        if line.find(b":") > 0:
            k, v = line.split(b": ", 1)
            self.assertTrue(k not in kw, k + b" in " +
                            unicode2bytes(str(kw)))
            kw[k] = v
        else:
            self.assertEqual(line, b"")
            hasEmptyLine = True
    request.written = b""
    self.assertTrue(hasEmptyLine)
    return kw