def _authorize(self):
        # Authorization, (mostly) per the RFC
        try:
            authh = self.getHeader("Authorization")
            if not authh:
                self.user = self.password = ''
                return
            bas, upw = authh.split()
            if bas.lower() != "basic":
                raise ValueError
            upw = base64.decodestring(upw)
            self.user, self.password = upw.split(':', 1)
        except (binascii.Error, __HOLE__):
            self.user = self.password = ""
        except:
            log.err()
            self.user = self.password = ""
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/web/http.py/Request._authorize