fphttpclient Chunk too big lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- kqha · 2020-05-01 10:33 I encountered some mysterious bug regarding fphttpclient, to replicate: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TForm1.Button1Click(Sender: TObject);var  http : TFPHTTPClient;  strm : TMemoryStream;begin  http := TFPHTTPClient.Create(nil);  strm := TMemoryStream.Create;  try    try      http.Get('http://localhost/fonts.zip',strm);      Memo1.Lines.Add('Successfully download '+IntToStr(strm.Size));    except      on e: exception do Memo1.Lines.Add(e.Message);    end;  finally    http.Free;    strm.Free;  end;end;  The code above run just fine when used to download file directly (fonts.zip), but when the URL is a result of a PHP script, for example: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i   I got an exception says Chunk too big. Such problem doesn't happen with Synapse. Any idea regarding this matter? ** Forgot to add, I use Lazarus 2.0.6 with FPC 3.0.4 ---------------------------------------------------------------------- Leledumbo · 2020-05-01 19:26 What's the full message? It should tell the maximum chunk size allowed. ---------------------------------------------------------------------- kqha · 2020-05-02 05:10 Quote from: Leledumbo on May 01, 2020, 09:26:58 pmWhat's the full message? It should tell the maximum chunk size allowed. Nothing, it just says "Chunk too big". The fonts.zip file size is just a mere 3 MB. ---------------------------------------------------------------------- Leledumbo · 2020-05-02 19:36 Quote from: kqha on May 02, 2020, 07:10:21 amQuote from: Leledumbo on May 01, 2020, 09:26:58 pmWhat's the full message? It should tell the maximum chunk size allowed. Nothing, it just says "Chunk too big". The fonts.zip file size is just a mere 3 MB. Oh, I guess the changes weren't in 3.0.4. You can try 3.2.0rc1 or trunk, I'm not sure what 3.0.4 has since I only use stable release for bootstrapping, my daily compilation uses trunk. ---------------------------------------------------------------------- kqha · 2020-05-03 08:38 Quote from: Leledumbo on May 02, 2020, 09:36:51 pmOh, I guess the changes weren't in 3.0.4. You can try 3.2.0rc1 or trunk, I'm not sure what 3.0.4 has since I only use stable release for bootstrapping, my daily compilation uses trunk. Can you recommend stable release that should be safe to use in production? I thought any download suggested in website announcement should be stable version ---------------------------------------------------------------------- lucamar · 2020-05-03 12:15 Quote from: kqha on May 03, 2020, 10:38:31 amCan you recommend stable release that should be safe to use in production? I thought any download suggested in website announcement should be stable version  Yes, those are the stable versions, which as of today are Lazarus 2.0.8 and (still) FPC 3.0.4. But note that FPC 3.2.0 is already in the release cycle (with a first Release Candidate that should also be quite "stable", though it may have still some quirks to iron out) so you can start using it in production, even if just to test your projects against it.