def found_terminator(self):
        if self.collector_body == None:
            # MIME headers collected, clear the buffer, split the
            # headers and continue ...
            return self.collector_continue(mime_headers.split(self.collector_buffer))

        elif self.collector_body.found_terminator():
            # if the MIME body final terminator is reached,
            # finalize it and reset the state of the collector
            # self.collector_buffer = '' # ?
            return self.collector_finalize()
 def found_headers(self):
     headers = mime_headers.map(mime_headers.split(self.buffer))
     collect = self.Collect(headers)
     if not collect.collector_is_simple:
         collect = collector.bind_complex(collector.Simple(), collect)
         # self.parts.append (collect)
     self.collect = collect
     self.collect_incoming_data = collect.collect_incoming_data
     self.found_terminator = self.found_boundary
     self.set_terminator(self.boundary)
     return False
Esempio n. 3
0
 def found_terminator (self):
         if self.collector_body == None:
                 # MIME headers collected, clear the buffer, split the
                 # headers and continue ...
                 return self.collector_continue (
                         mime_headers.split (self.collector_buffer)
                         )
                 
         elif self.collector_body.found_terminator ():
                 # if the MIME body final terminator is reached,
                 # finalize it and reset the state of the collector
                 # self.collector_buffer = '' # ?
                 return self.collector_finalize ()
Esempio n. 4
0
	def found_headers (self):
		headers = mime_headers.map (mime_headers.split (self.buffer))
                collect = self.Collect (headers)
		if not collect.collector_is_simple:
			collect = collector.bind_complex (
                                collector.Simple (), collect
                                )
		# self.parts.append (collect)
                self.collect = collect
		self.collect_incoming_data = collect.collect_incoming_data		
		self.found_terminator = self.found_boundary
		self.set_terminator (self.boundary)
		return False