Multiple choice technology security

How long does a request scope exist?

  1. The length of the User's Session

  2. The length of a single HTTP response

  3. The length of a single HTTP request

  4. Until the server is rebooted

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Request scope exists only for the duration of processing a single HTTP request/response cycle. Variables in request scope are created when the request arrives and destroyed after the response is sent. This is shorter than session scope (A) and application scope (D).

AI explanation

Request scope is the narrowest scope in most web frameworks: an object placed in request scope is created for and discarded at the end of a single HTTP request/response cycle. It doesn't survive to a follow-up request, and it's not tied to the whole session or the server's uptime, which is what distinguishes it from session, application, or page scope.