Jump to content
RDP1974

indy under Linux bug

Recommended Posts

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

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 by Remy Lebeau

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×