question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DefaultUriTemplateHandler.insertBaseUrl adds extra / to URL

See original GitHub issue

I have built a SDK using Spring-Vault 1.0.0.M2. It works fine until I switched to 1.0.0.RELEASE. Stepping into the code, I have found the URL sent to Vault has extra /http://127.0.0.1:8200/v1//sys/auth/cert. Further looking into the code, there is a line (#121) in DefaultUrlTemplateHandler.insertBaseUrl(UriComponents uriComponents)

String url = getBaseUrl() + uriComponents.toUriString();

I think to be defensive, the code should first check if there is any leading/trailing / before concatenates the string to avoid the extra / in the URL. Currently, the issue basically blocks me from using GA version in the SDK.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
spencergibbcommented, Apr 27, 2017

Please learn how to properly format code and logs.

0reactions
xiab71commented, Apr 28, 2017

Yes, you are right. It is spring-web dependency. As soon as I added 4.3.8.RELEASE for spring-web in pom.xml, the url is created correctly. Thanks for the reply.

Read more comments on GitHub >

github_iconTop Results From Across the Web

spring - What's the replacement for deprecated ...
In Spring 5, DefaultUriTemplateHandler is deprecated, and the suggested replacement is DefaultUriBuilderFactory .
Read more >
I-Index (Spring Framework 4.3.0.RC1 API)
Checks to see that a valid report file URL is supplied in the configuration. ... Adds initialization to a WebDataBinder via @InitBinder methods....
Read more >
HTTP client connector adds extra slash(/) before resource path.
I am using HTTP client connector to pass SFDC query. I want to pass the query dynamically hence gave https:// in Connection and...
Read more >
Index (spring-web 4.2.3.RELEASE API) - Javadoc Extreme
Extension point that subclasses can use to add extra bind values for a request. ... DefaultUriTemplateHandler() - Constructor for class ...
Read more >
Redirected URL has extra forward slash / | WordPress.org
However, I have one URL that when directed has an extra forward… ... The plugin only does what you tell it to do...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found