Cara Membuat Response Bug Di Delphi 7
Cara Membuat Response Bug Di Delphi 7
Cara Membuat Response Bug Di Delphi 7
private
enabledDuaRatusOK:boolean; // INI ADALAH BOOLEANNYA
{ Private declarations }
3. Tambahin komponen StatusBar / Label lalu beri script dibawah ini di TCP On
OutboundData
(Ganti bsSkinStatusPanel3.Caption dengan nama komponen di Form Anda):
if Pos (' 500 Internal Server Error', AThread.NetData) <>0 then begin
enabledDuaRatusOK := True;
AThread.NetData := StringReplace(athread.NetData,'500 Internal Server
Error','200 OK',[rfReplaceAll]);
bsSkinStatusPanel3.Caption :=' Response Received: 500 (Internal Server Error)';
end;
if Pos (' 501 Not Implemented', AThread.NetData) <>0 then begin
enabledDuaRatusOK := True;
AThread.NetData := StringReplace(athread.NetData,'501 Not Implemented','200 OK',
[rfReplaceAll]);
bsSkinStatusPanel3.Caption :=' Response Received: 501 (Not Implemented)';
end;
if Pos (' 502 Bad Gateway', AThread.NetData) <>0 then begin
enabledDuaRatusOK := True;
AThread.NetData := StringReplace(athread.NetData,'502 Bad Gateway','200 OK',
[rfReplaceAll]);
bsSkinStatusPanel3.Caption :=' Response Received: 502 (Bad Gateway)';
end;
if Pos (' 503 Service Unavailable', AThread.NetData) <>0 then begin
enabledDuaRatusOK := True;
AThread.NetData := StringReplace(athread.NetData,'503 Service Unavailable','200
OK',[rfReplaceAll]);
bsSkinStatusPanel3.Caption :=' Response Received: 503 (Service Unavailable)';
end;
if Pos (' 504 Gateway Timeout', AThread.NetData) <>0 then begin
enabledDuaRatusOK := True;
AThread.NetData := StringReplace(athread.NetData,'504 Gateway Timeout','200 OK',
[rfReplaceAll]);
bsSkinStatusPanel3.Caption :=' Response Received: 504 (Gateway Timeout)';
end;
if Pos (' 505 HTTP Version Not Supported', AThread.NetData) <>0 then begin
enabledDuaRatusOK := True;
AThread.NetData := StringReplace(athread.NetData,'505 HTTP Version Not
Supported','200 OK',[rfReplaceAll]);
bsSkinStatusPanel3.Caption :=' Response Received: 505 (HTTP Version Not
Supported)';
end;
if Pos (' 506 Variant Also Negotiates', AThread.NetData) <>0 then begin
enabledDuaRatusOK := True;
AThread.NetData := StringReplace(athread.NetData,'506 Variant Also
Negotiates','200 OK',[rfReplaceAll]);
bsSkinStatusPanel3.Caption :=' Response Received: 506 (Variant Also
Negotiates)';
end;
if Pos (' 507 Insufficient Storage', AThread.NetData) <>0 then begin
enabledDuaRatusOK := True;
AThread.NetData := StringReplace(athread.NetData,'507 Insufficient Storage','200
OK',[rfReplaceAll]);
bsSkinStatusPanel3.Caption :=' Response Received: 507 (Insufficient Storage)';
end;
if Pos (' 508 Loop Detected', AThread.NetData) <>0 then begin
enabledDuaRatusOK := True;
AThread.NetData := StringReplace(athread.NetData,'508 Loop Detected','200 OK',
[rfReplaceAll]);
bsSkinStatusPanel3.Caption :=' Response Received: 508 (Loop Detected)';
end;
if Pos (' 510 Not Extended', AThread.NetData) <>0 then begin
enabledDuaRatusOK := True;
AThread.NetData := StringReplace(athread.NetData,'510 Not Extended','200 OK',
[rfReplaceAll]);
bsSkinStatusPanel3.Caption :=' Response Received: 510 (Not Extended)';
end;
if Pos (' 511 Network Authentication Required', AThread.NetData) <>0 then begin
enabledDuaRatusOK := True;
AThread.NetData := StringReplace(athread.NetData,'511 Network Authentication
Required','200 OK',[rfReplaceAll]);
bsSkinStatusPanel3.Caption :=' Response Received: 511 (Network Authentication
Required)';
end;
//****************************************