Resposta curta
De acordo com a RFC 3986 , um caractere %
vazio não é válido URI sintaxe; Ele deve ser seguido por dois dígitos hexadecimais significativos.
Resposta longa
O código de status HTTP que você obteve pertence à classe 4xx
:
4xx: Client Error - The request contains bad syntax or cannot be fulfilled
Source: Hypertext Transfer Protocol (HTTP) Status Code Registry
Em particular, o código 400
é definido pelo IETF (Internet Engineering Task Force) em RFC 2616:
10.4.1 400 Bad Request
The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications.
Citando a Wikipédia (ênfase em negrito minha):
The characters allowed in a URI are either reserved or unreserved (or a percent character as part of a percent-encoding).
Se você quiser inserir um símbolo literal %
, precisará usar sua representação codificada por percentual: %25
.