code: def set_content_length(self):
          '''Find and set the content length.
  
          .. seealso:: :meth:`compute_checksum`.
          '''
          if not self.block_file:
              self.fields['Content-Length'] = '0'
              return
  
          with wpull.util.reset_file_offset(self.block_file):
              wpull.util.seek_file_end(self.block_file)
              self.fields['Content-Length'] = str(self.block_file.tell()f set_content_length(self):
          '''Find and set the content length.
  
          .. seealso:: :meth:`compute_checksum`.
          '''
          if not self.block_file:
              self.fields['Content-Length'] = '0'
              return
  
          with wpull.util.reset_file_offset(self.block_file):
              wpull.util.seek_file_end(self.block_file)
              self.fields['Content-Length'] = str(self.block_file.tell())
docs: Find and set the content length.
  
          .. seealso:: :meth:`compute_checksum`.