Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Quiz
/
Backend
/
WSGI
What is the safest portable way to read a normal WSGI request body?
from WSGI
Python 3.14
intermediate
1 min
What is the safest portable way to read a normal WSGI request body?
Call environ["wsgi.input"].read() with no limit for every request.
Validate CONTENT_LENGTH, enforce an application byte limit, then read no more than the accepted length.
Read until a newline because HTTP bodies always end with one.
Trust a Content-Type header to impose the correct memory limit.
Check
Ask AI about this kata
Report an error
previous kata
Which statement about WSGI concurrency is correct?
Quiz
next kata
What does this program print?
Predict the output
A new version is available
Reload