(self)
Set-up the _decoder attribute if necessary.
Set-up the _decoder attribute if necessary.
Set - up the _decoder attribute if necessary .
def _init_decoder(self):
        """
        Set-up the _decoder attribute if necessary.
        """
        # Note: content-encoding value should be case-insensitive, per RFC 7230
        # Section 3.2
        content_encoding = self.headers.get('content-encoding', '').lower()
        if self._decoder is None:
            if content_encoding in self.CONTENT_DECODERS:
                self._decoder = _get_decoder(content_encoding)
            elif ',' in content_encoding:
                encodings = [
                    e.strip() for e in content_encoding.split(',')
                    if e.strip() in self.CONTENT_DECODERS]
                if len(encodings):
                    self._decoder = _get_decoder(content_encoding)
def _init_decoder ( self ) : # Note: content-encoding value should be case-insensitive, per RFC 7230 # Section 3.2 content_encoding = self . headers . get ( 'content-encoding' , '' ) . lower ( ) if self . _decoder is None : if content_encoding in self . CONTENT_DECODERS : self . _decoder = _get_decoder ( content_encoding ) elif ',' in content_encoding : encodings = [ e . strip ( ) for e in content_encoding . split ( ',' ) if e . strip ( ) in self . CONTENT_DECODERS ] if len ( encodings ) : self . _decoder = _get_decoder ( content_encoding )