//------------向对方发回信息 两种方案(1 发送 HTML内容给对方,2 打开服务器已有文件内容给对方)---------------------
if URL_TempFile='' then
BEGIN
sMsg:='<head><title>IISColander(' + IISColanderSession.SessionWebUrl + ')为本站提供 防盗链 保护</title></head><body><h1>文件跳转</h1>';
sMsg:=sMsg+'IISColander(' + IISColanderSession.SessionWebUrl + ')为本站提供 防盗链 保护 <a HREF=http://';
sMsg:=sMsg+ sWebSite +'/ErrorFile/' + IISColanderSession.SessionErrorFile_GetUrl +'?URL="'+ sURL + sQUERY_STRING +'">跳转</a></body>';
sMsgLen:=length(sMsg);
Try
sHead:= 'Location: http://'+ sWebSite + '/ErrorFile/' + IISColanderSession.SessionErrorFile_GetUrl+'?URL="' + sURL + sQUERY_STRING+'"' + #13#10;
pfc.AddResponseHeaders(pfc,pchar(sHead),0);
sHead:= '302 IISColander(' + IISColanderSession.SessionWebUrl + ')为本站提供防盗链保据';
pfc.ServerSupportFunction(pfc, SF_REQ_SEND_RESPONSE_HEADER, PChar(sHead), 0, 0);
pfc.WriteClient(pfc, PChar(sMsg), sMsgLen, 0);
Except
IISColanderSession.WriteLog('Error: 防盗链回信息于对方操作失败'); //日志记录点
End;
Result:=SF_STATUS_REQ_FINISHED;
End
Else
Begin
Try
IISColanderSession.PRO_DEBUG('URL_TempFile:='+URL_TempFile); //这里是调试点
URL_MAP:=HTTP_FILTER_URL_MAP(pvNotification^);
StrLCopy(URL_MAP.pszPhysicalPath,pchar(URL_TempFile),length(URL_TempFile));
Except
IISColanderSession.WriteLog('Error: 防盗链绝对地址操作失败'); //日志记录点
END;
End;