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

Don't add slash to URI if it is a matrix parameter like (;matrixparam=value) #998

Closed
ranjitc5 opened this issue Jun 28, 2019 · 2 comments
Closed
Labels
bug Unexpected or incorrect behavior
Milestone

Comments

@ranjitc5
Copy link
Contributor

ranjitc5 commented Jun 28, 2019

After updating openfeign latest version I found that matrix parameters behaviour got changed. Seems its similar like #889

OpenFeign version : 10.1.0 or Latest

Please find below scenarios in which its creating a problem
When we have API end point with dynamic path and we try to get details using matrix params its creating a problem
For example:

Path ("{prefix}")
EmployeController {

  EmployeeList getEmployee(@PathParam("prefix") PathSegment pathSegment,
            @QueryParam("flag") String flag) throws Exception;
} 

Now when we try to call above mention api with latest version and after calling RequestTemplate -->> uri(matrix paramete details, true): its generate template uri like below

api/gituser/;includeDetails=false

Which was with earlier version like below

api/gituser;includeDetails=false

I have checked the same and I think we should add one more condition with semicolon in RequestTemplate --> url(string, boolean) method like
!uri.startsWith(";") for the matrix parameter.

I have few more scenarios which are creating same issue with latest version of open feign
Let me know if you need more details

@ranjitc5 ranjitc5 changed the title No Longer prepend uri with slash if it is a matrix parameter like (;matrixparam=value) Don't Add / to URI if it is a matrix parameter like (;matrixparam=value) Jun 28, 2019
@ranjitc5 ranjitc5 changed the title Don't Add / to URI if it is a matrix parameter like (;matrixparam=value) Don't Add Slash to URI if it is a matrix parameter like (;matrixparam=value) Jun 28, 2019
@ranjitc5 ranjitc5 changed the title Don't Add Slash to URI if it is a matrix parameter like (;matrixparam=value) Don't add Slash to URI if it is a matrix parameter like (;matrixparam=value) Jun 28, 2019
@ranjitc5 ranjitc5 changed the title Don't add Slash to URI if it is a matrix parameter like (;matrixparam=value) Don't add slash to URI if it is a matrix parameter like (;matrixparam=value) Jun 28, 2019
@kdavisk6 kdavisk6 added the bug Unexpected or incorrect behavior label Jul 12, 2019
@kdavisk6 kdavisk6 modified the milestones: 10.3.0, 10.2.4 Jul 12, 2019
@kdavisk6 kdavisk6 closed this as completed Aug 2, 2019
@ranjitc5
Copy link
Contributor Author

Hi @kdavisk6 ,

I can see my PR is merged and as per milestone it should be in 10.2.4 and 10.3.0 but I can't see any release with above mentioned version.

Can you please help me for the same ?

@kdavisk6
Copy link
Member

kdavisk6 commented Aug 12, 2019

It's been built and released as we speak. It will be 10.3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected or incorrect behavior
Projects
None yet
Development

No branches or pull requests

2 participants