I was wondering if web frameworks like Flask, Django, Akka HTTP, or Spring check headers before reading the body of the request.
I can have a web server endpoint that is used to upload some files, eg user avatar. Presumably, I could bump the server with huge files but without Auth headers and slow it down.
I think the server should first check if user is authorized / if headers are fine before reading the body into the memory. How do web frameworks solve this problem? Where can I read more how is it handled?