Prepare for the CompTIA PenTest+ Exam. Enhance your skills with practice questions and detailed explanations. Ace your test and advance your cybersecurity career!

Each practice test/flash card set has 50 randomly selected questions from a bank of over 500. You'll get a new set of questions each time!

Practice this question and more.


What is the URL-encoded representation of a space in a web request?

  1. %20

  2. %space

  3. _space_

  4. +space+

The correct answer is: %20

The URL-encoded representation of a space in a web request is represented as %20. This encoding is part of the Percent-encoding scheme used in URLs, where special characters that may not be safe or valid in a URL are replaced with a '%' symbol followed by two hexadecimal digits representing the ASCII value of the character. In the case of a space, its ASCII value is 32 in decimal, which is represented as 20 in hexadecimal. Other representations, such as %space, _space_, and +space+, are not valid URL encodings for a space. While the plus sign (+) can sometimes represent a space in the context of application/x-www-form-urlencoded data (commonly used for form submissions), the most universally accepted and correct representation for a space in URLs is indeed %20. Therefore, the correct choice aligns with standard URL encoding practices, ensuring compatibility and proper interpretation by web servers and browsers.