Delphi 10.1 Berlin THTTPClient Trouble (2)

Ok, switching to english for recapitulation

  1. Response.ContenAsString now checks for Content-Encoding = gzip and uses a compression stream (did make app crash)
  2. With AcceptEncoding = identity it can be avoided that a server adds this encoding
  3. It doesn’t matter what Encoding, Charset etc is set always get an EEncodingError querying IHTTPResponse.ContentAsString
    after successful POST (works in 10.0)
    (Embarcadero QC RSP-14300)
  4. Instead using IHTTPResponse.ContentAsString passing a TStringStream with HTTPClient.Post then
    no exception and StringStream.DataString is readable without any problem
  5. But final problem: Response delivers HTML and no JSON anymoreNow checking server side first if there is a problem before passing another bug report.
  6. My customer detected the reason:
    In Delphi 10.0 HTTPClient managed cookies from server login „behind the scene“ and sent it with every post..
    Proof: Setting HTTPClient.AllowCookies := False and an app does not work.
    In Delphi 10.1 Berlin this has changed, now there has to be added before a HTTPClient.Post
    HTTPClient.CustomHeaders[‚Cookie‘] := ‚WebBrokerSessionId=‘ + FSessionID;
    Otherwise any test app does not work.
    Removing such an automatism like this is a bug, time for another report. (Embarcadero QC RSP-14301)