@@ -32,6 +32,7 @@ pragma Ada_2012;
3232with Ada.Characters.Handling ;
3333with Ada.Exceptions ;
3434with Ada.Strings.Fixed ;
35+ with Ada.Strings.Maps ;
3536
3637with AWS.Digest ;
3738with AWS.Headers.Values ;
@@ -772,10 +773,10 @@ package body AWS.Client.HTTP_Utils is
772773 Headers : Header_List := Empty_Header_List)
773774 is
774775 use Real_Time;
775- Stamp : constant Time := Clock;
776- Pref_Suf : constant String := " --" ;
777- Boundary : constant String :=
778- " AWS_Attachment-" & Utils.Random_String (8 );
776+ Stamp : constant Time := Clock;
777+ Pref_Suf : constant String := " --" ;
778+ Boundary : constant String :=
779+ " AWS_Attachment-" & Utils.Random_String (8 );
779780
780781 Root_Content_Id : constant String := " <rootpart>" ;
781782 Root_Part_Header : AWS.Headers.List;
@@ -1081,10 +1082,7 @@ package body AWS.Client.HTTP_Utils is
10811082 Decrement_Authentication_Attempt
10821083 (Connection, Auth_Attempts, Auth_Is_Over);
10831084
1084- if Auth_Is_Over then
1085- exit Retry;
1086- end if ;
1087-
1085+ exit Retry when Auth_Is_Over;
10881086 exception
10891087 when E : Net.Socket_Error | Connection_Error =>
10901088 Error_Processing
@@ -1246,23 +1244,9 @@ package body AWS.Client.HTTP_Utils is
12461244 -- Returns "Keep-Alive" is we have a persistent connection and "Close"
12471245 -- otherwise.
12481246
1249- function Encoded_URI return String;
1250- -- Returns URI encoded (' ' -> '+')
1251-
1252- -- ---------------
1253- -- Encoded_URI --
1254- -- ---------------
1255-
12561247 function Encoded_URI return String is
1257- E_URI : String := URI;
1258- begin
1259- for K in E_URI'Range loop
1260- if E_URI (K) = ' ' then
1261- E_URI (K) := ' +' ;
1262- end if ;
1263- end loop ;
1264- return E_URI;
1265- end Encoded_URI ;
1248+ (Strings.Fixed.Translate (URI, Strings.Maps.To_Mapping (" " , " +" )));
1249+ -- Returns URI encoded (' ' -> '+')
12661250
12671251 -- ---------------
12681252 -- Persistence --
@@ -1501,6 +1485,7 @@ package body AWS.Client.HTTP_Utils is
15011485 Response.Set.Append_Body
15021486 (Result, " ..." & ASCII.LF & " Response Timeout" );
15031487 end if ;
1488+
15041489 Response.Set.Status_Code (Result, Messages.S408);
15051490 exit ;
15061491 end if ;
@@ -1886,8 +1871,7 @@ package body AWS.Client.HTTP_Utils is
18861871
18871872 -- Send the setting frame (stream id 0)
18881873
1889- HTTP2.Frame.Settings.Create
1890- (Settings).Send (Connection.Socket.all );
1874+ HTTP2.Frame.Settings.Create (Settings).Send (Connection.Socket.all );
18911875
18921876 -- We need to read the settings from server
18931877
0 commit comments