MCPcopy
hub / github.com/benoitc/gunicorn / __next__

Method __next__

gunicorn/http/parser.py:101–114  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

99 pass
100
101 def __next__(self):
102 # Stop if HTTP dictates a stop.
103 if self.mesg and self.mesg.should_close():
104 raise StopIteration()
105
106 # Discard any unread body of the previous message
107 self.finish_body()
108
109 # Parse the next request
110 self.req_count += 1
111 self.mesg = self.mesg_class(self.cfg, self.unreader, self.source_addr, self.req_count)
112 if not self.mesg:
113 raise StopIteration()
114 return self.mesg
115
116 next = __next__
117

Callers

nothing calls this directly

Calls 2

finish_bodyMethod · 0.95
should_closeMethod · 0.45

Tested by

no test coverage detected