code: def length(self):
          
          def ProcessContentRange(content_range):
              _, _, range_spec = content_range.partition(' ')
              byte_range, _, _ = range_spec.partition('/')
              start, _, end = byte_range.partition('-')
              return int(end) - int(start) + 1
  
          if '-content-encoding' in self.info and 'content-range' in self.info:
              # httplib2 rewrites content-length in the case of a compressed
              # transfer; we can't trust the content-length header in that
              # case, but we *can* trust content-range, if it's present.
              return ProcessContentRange(self.info['content-range'])
          elif 'content-length' in self.info:
              return int(self.info.get('content-length'))
          elif 'content-range' in self.info:
              return ProcessContentRange(self.info['content-range'])
          return len(self.content)
docs: Return the length of this response.
  
          We expose this as an attribute since using len() directly can fail
          for responses larger than sys.maxint.
  
          Returns:
            Response length (as int or long)