RDP1974 40 Posted July 17, 2020 hello, there is a bug in webbroker indy based under Linux, the Request.ContentFields is not filled correctly from client Ajax POST meanwhile works correctly in Windows Delphi 10.3.3 Share this post Link to post
Remy Lebeau 1394 Posted July 17, 2020 (edited) Can you be a little more specific? ContentFields is a property of TWebRequest itself, it is not implemented by Indy. TWebRequest parses data the same way regardless of platform. And there is no platform-specific code in Indy's IdHTTPWebBrokerBridge.pas, either. So, it does not really make sense for the ContentFields to be empty on Linux but not on Windows, unless there is a low-level error occuring. Internally, the TWebRequest.ContentFields property getter calls TWebRequest.ExtractContentFields() to fill a TStringList, and then returns that TStringList. TWebRequest.ExtractContentFields() checks the TWebRequest.ContentLength property for > 0, and if true then reads the TWebRequest.Content property and parses it into name=value pairs. The TWebRequest.Content data is decoded from the TWebRequest.RawContent property using a charset determined from the TWebRequest.ContentType property. Indy's TIdHTTPAppRequest class provided the data for the ContentLength, ContentType, and RawContent properties. So, what exactly is broken on Linux? Which property is not returning what it should be - ContentLength, ContentType, or RawContent? If all of those properties are returning valid data, but the ContentFields is still blank, then the problem is in WebBroker itself, not in Indy. Edited July 17, 2020 by Remy Lebeau Share this post Link to post