parameters: (self)
docstring: Compute Content-Length or switch to chunked encoding if possible
docstring_summary: Compute Content-Length or switch to chunked encoding if possible
docstring_tokens: Compute Content - Length or switch to chunked encoding if possible
function: def set_content_length(self):
          """Compute Content-Length or switch to chunked encoding if possible"""
          try:
              blocks = len(self.result)
          except (TypeError,AttributeError,NotImplementedError):
              pass
          else:
              if blocks==1:
                  self.headers['Content-Length'] = str(self.bytes_sent)
                  return
function_tokens: def set_content_length ( self ) : try : blocks = len ( self . result ) except ( TypeError , AttributeError , NotImplementedError ) : pass else : if blocks == 1 : self . headers [ 'Content-Length' ] = str ( self . bytes_sent ) return