-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce path encoding (fixes #1561)
HttpRequestBuilder.java - replaced armeria QueryParamsBuilder with apache http `URIBuilder`. - minor generics cleanup - `URIBuilder` now handles path segment encoding and query parameters. - we now check if any paths are prefixed with `/` and issue a warning log, that this is probably a mistake encoding.feature - added more demo/test cases for path encoding HttpUtils.java - minor generics cleanup - final is redundant on static methods karate-demo/pom.xml - scope = import only works in the dependencyManagement section, this fixes the maven warning. Request.java - minor generics cleanup - use computeIfAbsent() HttpClientFactory.java - public static final are redundant on interface fields - also use method reference KarateMockHandlerTest.java KarateHttpMockHandlerTest.java - removed all `/` path prefixes README.md - updated with details on how to correctly use path - changes any erroneous examples of path usage Introduce path encoding (fixes #1561) HttpRequestBuilder.java - replaced armeria QueryParamsBuilder with apache http URIBuilder. - minor generics cleanup - introduced support for fragments. - URIBuilder now handles path segment encoding, query parameters and any fragment. - care was taken to ensure that path's prefixed with / are accepted, but a warning is printed letting people know they should remove the prefixing / encoding.feature - added more demo/test cases for path encoding HttpUtils.java - minor generics cleanup - final is redundant on static methods karate-demo/pom.xml - scope = import only works in the dependencyManagement section, this fixes the maven warning. Request.java - minor generics cleanup - use computeIfAbsent() - cleanup the setUrl() method, no longer need to hack around Spring's decoding issue, at least in this class.. HttpClientFactory.java - public static final are redundant on interface fields - also use method reference EncodingController.java - because this controller is used in two different context's 1) spring's mock mvc environment 2) spring boot + tomcat - it needs to account for the different quirks of those environments. MockHttpClient.java - spring is somehow messing up the decoding of the pathInfo from the supplied url, using ISO 8859-1 instead of UTF-8, so here we explicitly set the pathInfo variable using the result of the trusted URI class :)
- Loading branch information
1 parent
bbecea4
commit becd0e9
Showing
14 changed files
with
176 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.