CBWire 4 & BonCode Connector

I ran into an interesting issue after testing CBWire 4 on a lucee server behind IIS and using the BonCode AJP Connector. It took me a few minutes to track it down and I figured I would post what I found here in the event anyone else has a similar issue.

The initial render of the wire on the page was working fine however on any livewire requests the /cbwire/update endpoint was getting a 400 Bad Request. Interestingly however was that the request was being captured in cbdebugger as well as the 400 response.

After a few minutes of troubleshooting I realized that the /BIN/BonCodeAJP13.settings file included <AllowEmptyHeaders>False</AllowEmptyHeaders> and livewire sends an empty X-Livewire: header. The BonCode connector was removing that header and causing the application to return 400 Bad Request.

After changing it to <AllowEmptyHeaders>True</AllowEmptyHeaders> it worked as expected.

Just thought I would share for anyone else that may run into the issue as well and hopefully might help them!

1 Like

Thanks for sharing @MikeR! I haven’t run into that myself, but that makes sense, and I wonder why Livewire decided to send an empty header anyway.

I’ll get this added to the Troubleshooting section of the docs in case anyone else runs into it.

No problem! That would be great!