jakartaee / jakartaee/servlet

handling lenient query strings

Open
#102 3 comments 0 reactions 1 assignee Claimed by @glassfishrobot View on GitHub
Enhancement
Dominant language
Java
Stars
325
Forks
112
PR merge metrics
No merged PRs in 30d

Description

The javadoc says that query string should not be decoded by the container. However, does that mean that the string has to be exactly what the container received?

Consider the URL

[http://localhost:8080/hi?e=w%6fah](http://localhost:8080/hi?e=w%6fah) dude

It has a space in the query that really should be encoded, but most containers are lenient.

But if the query string returned is "w%6fah dude", then this makes it difficult to use this query to reform new URIs as many libraries will error if the space is passed.

However, if the query string is simply encoded it will become: "w%256fah%20dude", which is also wrong.

Should we say that any container that does lenient parsing of the query string corrects those errors in the returned query string? So in this case getQueryString will return "w%6fah%20dude"?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.