Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing query string conversion in TomcatService #74

Merged
merged 1 commit into from
Dec 21, 2015

Conversation

trustin
Copy link
Member

@trustin trustin commented Dec 21, 2015

Motivation:

TomcatServiceInvocationHandler does not set the 'queryString' property
of Coyote Request object during the conversion.

Modifications:

  • Call Request.queryString().setString() if HttpRequest.uri() has a
    query string
  • Add the test cases for GET and POST with query parameters

Result:

Web application gets query parameters correctly.

Motivation:

TomcatServiceInvocationHandler does not set the 'queryString' property
of Coyote Request object during the conversion.

Modifications:

- Call Request.queryString().setString() if HttpRequest.uri() has a
  query string
- Add the test cases for GET and POST with query parameters

Result:

Web application gets query parameters correctly.
@trustin trustin added the defect label Dec 21, 2015
@trustin trustin added this to the 0.6.4.Final milestone Dec 21, 2015
@trustin
Copy link
Member Author

trustin commented Dec 21, 2015

@delegacy PTAL

public void testGetQueryString() throws Exception {
try (CloseableHttpClient hc = HttpClients.createMinimal()) {
try (CloseableHttpResponse res = hc.execute(
new HttpGet(uri("/tc/query_string.jsp?foo=%31&bar=%32")))) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These URL encoded values are intentional?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, to test if they are decoded properly.

@delegacy
Copy link
Contributor

LGTM.

delegacy added a commit that referenced this pull request Dec 21, 2015
Fix missing query string conversion in TomcatService
@delegacy delegacy merged commit 85970bd into line:master Dec 21, 2015
@trustin trustin deleted the tomcat_query_string branch December 21, 2015 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants