> What next problem you have with TOP and UIDL x?
Having few more suggestions for TPOP3Send and bug fix for THTTPSend.
=========
TPOP3Send
=========
Suggestion to enable telnet ability for POP3. As there is a problem to get
full response data directly through POP3.Sock.SendString. I added new
SendCommand method as follows:
TPOP3Send = class(TSynaClient)
private
function ReadResult(Full: Boolean): Integer;
//SZ
function ReadRAWResult: Integer;
public
//SZ
{:Send command to the POP3 server and collect resut to a stream -
- Telnet behavior.}
function SendCommand(const Command:string): Boolean;
...
//SZ
function TPOP3Send.ReadRAWResult: Integer;
var
s: string;
begin
Result := 0;
FFullResult.Clear;
s := FSock.RecvString(FTimeout);
if Pos('+OK', s) = 1 then
Result := 1;
FResultString := s;
FFullResult.Clear;
repeat
FFullResult.Add(s);
s := FSock.RecvString(FTimeout);
until FSock.LastError <> 0;
FResultCode := Result;
end;
//SZ
function TPOP3Send.SendCommand(const Command:string): Boolean;
begin
FSock.SendString(Command + CRLF);
Result:=ReadRAWResult= 1;
end;
=========
THTTPSend
=========
This is a bug I reported earlier regarding Range. However it is not corrected,
and the problem is that given rage from 0 - n will fail. As well, it is useful
to handle error 416. Corrections:
procedure THTTPSend.Clear;
begin
FRangeStart := -1;
FRangeEnd := -1;
FDocument.Clear;
FHeaders.Clear;
FMimeType := 'text/html';
end;
function THTTPSend.HTTPMethod(const Method, URL: string): Boolean;
...
//SZ
if FRangeStart >= 0 then
// if FRangeStart > 0 then
begin
if FRangeEnd >= FRangeStart then
...
Receiving := Receiving and (FResultCode <> 204);
Receiving := Receiving and (FResultCode <> 304);
//SZ
Receiving := Receiving and (FResultCode <> 416);
if Receiving then
...
---------------
Sasa
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
synalist-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synalist-public