API classes' constructors using the default KillBillHttpClient constructor cause 404 because of bad url formatting
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 45/100
Research direction
Start with KillBillHttpClient.getURI() and the default constructors used by API classes such as TenantApi. Reproduce a request without the killbill.url system property, then verify that the constructed URL no longer contains the extra slash and that the request does not return 404.
Written by the indexing model from the issue text.
Description
So API classes (TenantApi for instance) have default constructors that call the default constructor of KillBillHttpClient. The latter relies on system properties or fallback values to init some fileds namely the KillBillHttpClient's kbServerUrl field, so if the system property "killbill.url" isn't set, the fallback value "http://127.0.0.1:8080/" is used instead and since each api has a uri(path) looking like this "/1.0/kb/tenants" , so this line
"u = new URI(String.format("%s%s", this.kbServerUrl, url));" in KillBillHttpClient.getURI() is causing the url used in request to look like this "http://127.0.0.1:8080//1.0/kb/tenants" (notice the // after port), this is causing every request to return null (404 not found) ,as a fix when I set the system property killbill.url to "http://127.0.0.1:8080", requests are successful !
#version1.3.8
- Dominant language
- Java
- Stars
- 35
- Forks
- 68
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from killbill/killbill-client-java
-
Migrate away from Joda-Time to java.timeMay be free again @sbrossie claimed this 269 days ago, and no pull request is open. Openenhancement
killbill/killbill-client-java#144 · 1 comment · 1 assignee ·
-
Difficulty 3/5 1-2 days Newbie friendliness 38/100
killbill/killbill-client-java#136 · 7 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
killbill/killbill-client-java#135 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
killbill/killbill-client-java#131 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
killbill/killbill-client-java#130 ·
All issues in killbill/killbill-client-java
Similar issues
-
component/data-layer
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
-
RegistryExceptionHandler uses self-referencing basePackageClasses instead of a controller classOpenbug finsim-registry good-first-issue
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
? - Needs Triage bug
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
NVIDIA/cudf-spark#17063 ·
Maintainers usually reply within 2 days
-
status:pending type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100