Invalid Content-Encoding header for plugin endpoints

62 views
Skip to first unread message

Kamil Walkowiak

unread,
May 9, 2024, 8:59:46 AM5/9/24
to Kill Bill users mailing-list
Hello,

I have find out that around Killbill version 0.24.5, there was introduced a change that some additional headers will be added to the plugin endpoints (when not set by the plugin endpoint), see: https://github.com/killbill/killbill/pull/1902

This change introduced an issue when each plugin endpoint is returning Content-Encoding: UTF-8 header (no matter what Accept-Encoding header says). This value is an invalid content encoding type as it's a charset (properly set in the Content-Type header), not an encoding type.

The issue is causing some of the HTTP request adapters to raise an exception because of an invalid HTTP response headers.

I'm suspecting this line is responsible for the described behavior

Could you please take care of this issue and fix it so that no Content-Encoding is set on the plugin endpoints by default?

Regards,
Kamil Walkowiak

Jimmy Merari

unread,
Jun 24, 2024, 12:14:21 PM6/24/24
to Kill Bill users mailing-list
Hello,
I confirm that I also encounter the same problem. 
I implement notification webhook using plugin servlet. My webhook response is marked as failure by the payment gateway.
For the mean time I can just comment out those lines that put Content-Encoding: UTF-8 into the header.
Not sure whether that is the correct way. I'm just in my second month into Killbill plugin development.

Regards,
Jimmy

Kamil Walkowiak

unread,
Apr 11, 2025, 8:52:25 AM4/11/25
to Kill Bill users mailing-list
Hello,

is anyone from the KB dev team gonna respond here? It's almost 1 year after I reported this issue, it's still present in the KB codebase and no one responded here.
My team would like to upgrade the KB to the 0.24.11 version (as it includes some fixes crucial for our development) but cannot do so because of the headers issue breaking plugins we are using.

Regards,
Kamil Walkowiak

Pierre-Alexandre Meyer

unread,
Apr 11, 2025, 9:00:33 AM4/11/25
to Kamil Walkowiak, Kill Bill users mailing-list
Hello from the dev team!

Fastest way for us to look at it would be to create a ticket with a test highlighting the issue (e.g., https://github.com/killbill/killbill/blob/master/profiles/killbill/src/test/java/org/killbill/billing/jaxrs/TestPlugin.java)?

Even better if you can submit a PR with a proposed fix ;-)

FWIW we haven't had any other report about this behavior.

Cheers,

--
You received this message because you are subscribed to the Google Groups "Kill Bill users mailing-list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to killbilling-us...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/killbilling-users/b5055873-867e-4f9d-b4b8-d9b5232885bbn%40googlegroups.com.


--
Pierre

stephane brossier

unread,
Apr 15, 2025, 1:26:43 PM4/15/25
to Kamil Walkowiak, Kill Bill users mailing-list
Kamil,

Thanks for reporting the issue. I made a fix in this PR and we just merged it so the fix is available in our 'master' branch and it will be part of our next release - don't have a date for this yet.

Stéphane



Kamil Walkowiak

unread,
Apr 15, 2025, 1:26:47 PM4/15/25
to stephane brossier, Kill Bill users mailing-list
Hello Stéphane,

Thank you very much, great news. For now, we have used some kind of a different request adapter (one that doesn't validate the HTTP response headers) so we may proceed with the upgrade but will watch forward for the upcoming release then.

Regards,
Kamil Walkowiak


--
Kamil Walkowiak
Senior Full Stack Engineer


Reply all
Reply to author
Forward
0 new messages