File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ KafkaSchemaRegistry::KafkaSchemaRegistry(
22
22
const String & certificate_file_,
23
23
const String & ca_location_,
24
24
bool skip_cert_check)
25
- : base_url(base_url_)
25
+ : base_url(base_url_.ends_with( " / " ) ? base_url_ : base_url_ + " / " )
26
26
, private_key_file(private_key_file_)
27
27
, certificate_file(certificate_file_)
28
28
, ca_location(ca_location_)
@@ -46,7 +46,8 @@ String KafkaSchemaRegistry::fetchSchema(UInt32 id)
46
46
{
47
47
try
48
48
{
49
- Poco::URI url (base_url, std::format (" /schemas/ids/{}" , id));
49
+ // / Do not use "/schemas/ids/{}" here, otherwise the `path` in `base_url` will be removed.
50
+ Poco::URI url (base_url, std::format (" schemas/ids/{}" , id));
50
51
LOG_TRACE (logger, " Fetching schema id = {}" , id);
51
52
52
53
// / One second for connect/send/receive. Just in case.
You can’t perform that action at this time.
0 commit comments