Skip to content

Commit 329654a

Browse files
committed
Clean-up multiple definitions of CRLF.
Part of S507-051.
1 parent bc9bdee commit 329654a

File tree

8 files changed

+7
-15
lines changed

8 files changed

+7
-15
lines changed

src/core/aws-attachments.adb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -339,8 +339,6 @@ package body AWS.Attachments is
339339
(Attachments : List;
340340
Boundary : String)
341341
is
342-
CRLF : constant String := String'(1 => ASCII.CR, 2 => ASCII.LF);
343-
344342
procedure Send_Attachment (Attachment : Element);
345343
-- Sends one Attachment, including the start boundary
346344

@@ -635,7 +633,6 @@ package body AWS.Attachments is
635633
Boundary : out Unbounded_String;
636634
Alternative : Boolean := False)
637635
is
638-
CRLF : constant String := String'(1 => ASCII.CR, 2 => ASCII.LF);
639636
L_Boundary : constant String :=
640637
"----=_NextPart_" & Utils.Random_String (10) & "."
641638
& Utils.Image (UID.Value);

src/core/aws-client-http_utils.adb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -934,7 +934,6 @@ package body AWS.Client.HTTP_Utils is
934934
is
935935
use Real_Time;
936936

937-
CRLF : constant String := String'(1 => ASCII.CR, 2 => ASCII.LF);
938937
Stamp : constant Time := Clock;
939938
Settings : constant HTTP2.Frame.Settings.Set :=
940939
Get_Settings (Connection.Config);

src/core/aws-headers.adb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,7 @@ package body AWS.Headers is
7979

8080
procedure Get_Content
8181
(Headers : List;
82-
End_Block : Boolean := False)
83-
is
84-
CRLF : constant String := String'(1 => ASCII.CR, 2 => ASCII.LF);
82+
End_Block : Boolean := False) is
8583
begin
8684
for J in 1 .. Count (Headers) loop
8785
Data (Get_Line (Headers, J) & CRLF);

src/core/aws-net-buffered.adb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ with AWS.Translator;
3636
package body AWS.Net.Buffered is
3737

3838
CRLF : constant Stream_Element_Array :=
39-
Translator.To_Stream_Element_Array (ASCII.CR & ASCII.LF);
39+
(1 => Character'Pos (ASCII.CR),
40+
2 => Character'Pos (ASCII.LF));
4041

4142
Input_Limit : Positive := AWS.Default.Input_Line_Size_Limit with Atomic;
4243

src/core/aws-response.ads

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,8 +435,6 @@ private
435435
Default_Moved_Message : constant String :=
436436
"Page moved<br><a href=""_@_"">Click here</a>";
437437

438-
CRLF : constant String := ASCII.CR & ASCII.LF;
439-
440438
Default_Authenticate_Message : constant String :=
441439
"<HTML><HEAD>" & CRLF
442440
& "<TITLE>401 Authorization Required</TITLE>" & CRLF

src/core/aws.ads

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,6 @@ package AWS with Pure is
4141

4242
type HTTP_Protocol is (HTTPv1, HTTPv2);
4343

44+
CRLF : constant String := String'(1 => ASCII.CR, 2 => ASCII.LF);
45+
4446
end AWS;

src/extended/aws-pop.adb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
------------------------------------------------------------------------------
22
-- Ada Web Server --
33
-- --
4-
-- Copyright (C) 2003-2019, AdaCore --
4+
-- Copyright (C) 2003-2021, AdaCore --
55
-- --
66
-- This library is free software; you can redistribute it and/or modify --
77
-- it under terms of the GNU General Public License as published by the --
@@ -48,8 +48,6 @@ package body AWS.POP is
4848

4949
subtype Stream_Type is AWS.Resources.Streams.Memory.Stream_Type;
5050

51-
CRLF : constant String := ASCII.CR & ASCII.LF;
52-
5351
procedure Check_Response (Response : String);
5452
-- Checks server's response, raise POP_Error with server's message
5553

src/extended/aws-smtp-server.adb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
------------------------------------------------------------------------------
22
-- Ada Web Server --
33
-- --
4-
-- Copyright (C) 2008-2017, AdaCore --
4+
-- Copyright (C) 2008-2021, AdaCore --
55
-- --
66
-- This library is free software; you can redistribute it and/or modify --
77
-- it under terms of the GNU General Public License as published by the --
@@ -98,7 +98,6 @@ package body AWS.SMTP.Server is
9898
is
9999

100100
Empty_Line : constant String := "";
101-
CRLF : constant String := ASCII.CR & ASCII.LF;
102101

103102
procedure Read_Message_Body;
104103
-- Read message body from the current socket and set the Message_Body

0 commit comments

Comments
 (0)