@@ -31,6 +31,8 @@ with Ada.Streams;
3131
3232package AWS.HTTP2 is
3333
34+ use Ada.Streams;
35+
3436 type Bit_1 is mod 2 ** 1 with Size => 1 ;
3537
3638 type Byte_1 is mod 2 ** 8 with Size => 8 ;
@@ -49,16 +51,15 @@ package AWS.HTTP2 is
4951 C_Enhance_Your_CALM, C_Inadequate_Security, C_HTTP_1_1_Required);
5052 -- Error codes that are used in RST_Stream and GoAway frames
5153
52- Client_Connection_Preface : constant Ada.Streams.Stream_Element_Array :=
53- (16#50# , 16#52# , 16#49# , 16#20# , 16#2a# ,
54- 16#20# , 16#48# , 16#54# , 16#54# , 16#50# ,
55- 16#2f# , 16#32# , 16#2e# , 16#30# , 16#0d# ,
56- 16#0a# , 16#0d# , 16#0a# , 16#53# , 16#4d# ,
57- 16#0d# , 16#0a# , 16#0d# , 16#0a# );
58- -- "PRI * HTTP/2.0" & CRLF & CRLF & "SM" & CRLF & CRLF
59-
6054 Client_Connection_Preface_1 : constant String := " PRI * HTTP/2.0" ;
55+ -- Connection preface first part
56+
6157 Client_Connection_Preface_2 : constant String := " SM" ;
58+ -- Connection preface second part
59+
60+ Client_Connection_Preface : constant Stream_Element_Array;
61+ -- The full connection preface:
62+ -- "PRI * HTTP/2.0" & CRLF & CRLF & "SM" & CRLF & CRLF
6263
6364 function Exception_Message
6465 (Error : Error_Codes; Message : String) return String;
@@ -74,6 +75,13 @@ package AWS.HTTP2 is
7475
7576private
7677
78+ Client_Connection_Preface : constant Stream_Element_Array :=
79+ (16#50# , 16#52# , 16#49# , 16#20# , 16#2a# ,
80+ 16#20# , 16#48# , 16#54# , 16#54# , 16#50# ,
81+ 16#2f# , 16#32# , 16#2e# , 16#30# , 16#0d# ,
82+ 16#0a# , 16#0d# , 16#0a# , 16#53# , 16#4d# ,
83+ 16#0d# , 16#0a# , 16#0d# , 16#0a# );
84+
7785 for Error_Codes use (C_No_Error => 16#0# ,
7886 C_Protocol_Error => 16#1# ,
7987 C_Internal_Error => 16#2# ,
0 commit comments