|
@@ -253,6 +253,7 @@ type
|
|
Property CookieFields : TStrings Read FCookieFields Write SetCookieFields;
|
|
Property CookieFields : TStrings Read FCookieFields Write SetCookieFields;
|
|
Property ContentFields: TStrings read FContentFields;
|
|
Property ContentFields: TStrings read FContentFields;
|
|
property QueryFields : TStrings read FQueryFields;
|
|
property QueryFields : TStrings read FQueryFields;
|
|
|
|
+ Procedure SendTemporaryRedirect(const TargetURL:String);
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|
|
@@ -734,6 +735,21 @@ begin
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+procedure THTTPHeader.SendTemporaryRedirect(const TargetURL: String);
|
|
|
|
+begin
|
|
|
|
+ Location := TargetURL;
|
|
|
|
+ if FHttpVersion = '1.1' then
|
|
|
|
+ begin
|
|
|
|
+ Code := 307;// HTTP/1.1 307 HTTP_TEMPORARY_REDIRECT -> 'Temporary Redirect'
|
|
|
|
+ CodeText := 'Temporary Redirect';
|
|
|
|
+ end
|
|
|
|
+ else
|
|
|
|
+ begin
|
|
|
|
+ Code := 302;// HTTP/1.0 302 HTTP_MOVED_TEMPORARILY -> 'Found'
|
|
|
|
+ CodeText := 'Moved Temporarily';
|
|
|
|
+ end;
|
|
|
|
+end;
|
|
|
|
+
|
|
procedure THttpHeader.SetFieldByName(const AName, AValue: String);
|
|
procedure THttpHeader.SetFieldByName(const AName, AValue: String);
|
|
var
|
|
var
|
|
i: Integer;
|
|
i: Integer;
|