HTTP API with boolean "HttpApiHeaderParameter" - after upgrade to 10.0.0.1627

Hi Remobjects

It looks to me like the evaluation of a HttpApiHeaderParameter of type boolean has become more strict. In the sense that if you pass an illegal boolean value (could be “”) you get a blow up = “Invalid Path” 500 internal server error.

In previous release this was more forgiving (I could be wrong)…

I could patch the “uROJSONMessage.pas” function “TROJSONSerializer.ReadEnumerated” to not blow up when encountering an illegal “boolean” in the “if Boolean(l_item.VarValue) then” line… Or is there a much better way that I am missing ?

Your recommandations for a way forward would be very much appreciated…

Best Regards Christian

Hi Christian,

This code hasn’t changed in recent releases. To reproduce the issue, could you send us:

  1. The exact header value that fails (raw request).

  2. The version you upgraded from.

btw, could you try setting SendExceptionsAs500 := False on your HTTP server component?
Then instead of “Invalid Path” you’ll get a 400 with the real error message, which should show us what exactly fails.