Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2013
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.71 KB | None | 0 0
  1.     // Show the current status of read stream.
  2.     procedure ReadingResponse(const Size: Int64; Stream: TStream); virtual;
  3. (...)
  4. procedure TFPCustomHTTPClient.ReadResponse(Stream: TStream; Const AllowedResponseCodes : Array of Integer; HeadersOnly: Boolean = False);
  5. (...)
  6.   Len: Int64;
  7. begin
  8. (...)
  9.       Repeat
  10.         LB:=ReadBufLen;
  11.         If (LB>L) then
  12.           LB:=L;
  13.         R:=Transfer(LB);
  14.         ReadingResponse(Len, Stream);
  15.         L:=L-R;
  16.       until (L=0) or (R=0);
  17.       end
  18.     else if L<0 then
  19.       begin
  20.       // No content-length, so we read till no more data available.
  21.       Repeat
  22.         R:=Transfer(ReadBufLen);
  23.         ReadingResponse(Len, Stream);
  24.       until (R=0);
  25. (...)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement