mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 19:49:09 +02:00
* Uppercase argument for GetHTTPStatusText
This commit is contained in:
parent
66a1486f32
commit
a390a27420
@ -133,7 +133,7 @@ Function HTTPDecode(const AStr: String): String;
|
|||||||
Function HTTPEncode(const AStr: String): String;
|
Function HTTPEncode(const AStr: String): String;
|
||||||
Function IncludeHTTPPathDelimiter(const AStr: String): String;
|
Function IncludeHTTPPathDelimiter(const AStr: String): String;
|
||||||
Function ExcludeHTTPPathDelimiter(const AStr: String): String;
|
Function ExcludeHTTPPathDelimiter(const AStr: String): String;
|
||||||
Function GetHTTPStatusText (ACode: Integer) : String;
|
Function GetHTTPStatusText (ACode: Cardinal; aUppercase : Boolean = False) : String;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
@ -269,7 +269,7 @@ begin
|
|||||||
Result:=AStr;
|
Result:=AStr;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Function GetHTTPStatusText (ACode: Integer) : String;
|
Function GetHTTPStatusText (ACode: Cardinal; aUppercase : Boolean = False) : String;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Case ACode of
|
Case ACode of
|
||||||
@ -326,8 +326,10 @@ begin
|
|||||||
504 : Result:='Gateway Time-out';
|
504 : Result:='Gateway Time-out';
|
||||||
505 : Result:='HTTP Version not supported';
|
505 : Result:='HTTP Version not supported';
|
||||||
else
|
else
|
||||||
Result:='Unknown status';
|
Result:=Format('Unknown status: %d',[aCode]);
|
||||||
end;
|
end;
|
||||||
|
If aUpperCase then
|
||||||
|
Result:=Uppercase(Result);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
Loading…
Reference in New Issue
Block a user