MCPcopy
hub / github.com/pallets/werkzeug / parse_from_environ

Method parse_from_environ

src/werkzeug/formparser.py:194–208  ·  view source on GitHub ↗

Parses the information from the environment as form data. :param environ: the WSGI environment to be used for parsing. :return: A tuple in the form ``(stream, form, files)``.

(self, environ: WSGIEnvironment)

Source from the content-addressed store, hash-verified

192 self.silent = silent
193
194 def parse_from_environ(self, environ: WSGIEnvironment) -> t_parse_result:
195 """Parses the information from the environment as form data.
196
197 :param environ: the WSGI environment to be used for parsing.
198 :return: A tuple in the form ``(stream, form, files)``.
199 """
200 stream = get_input_stream(environ, max_content_length=self.max_content_length)
201 content_length = get_content_length(environ)
202 mimetype, options = parse_options_header(environ.get("CONTENT_TYPE"))
203 return self.parse(
204 stream,
205 content_length=content_length,
206 mimetype=mimetype,
207 options=options,
208 )
209
210 def parse(
211 self,

Callers 2

parse_form_dataFunction · 0.80

Calls 5

parseMethod · 0.95
get_input_streamFunction · 0.85
parse_options_headerFunction · 0.85
get_content_lengthFunction · 0.70
getMethod · 0.45

Tested by 1