@@ -57,13 +57,19 @@ object ServerTestRoutes extends Http4sDsl[IO] {
57
57
// ///////////////////////////////
58
58
(
59
59
" GET /get HTTP/1.0\r\n Connection:close\r\n\r\n " ,
60
- (Status .Ok , Set (length(3 ), textPlain, connClose ), " get" ),
60
+ (Status .Ok , Set (length(3 ), textPlain), " get" ),
61
61
),
62
62
// ///////////////////////////////
63
63
(
64
64
" GET /get HTTP/1.1\r\n Connection:close\r\n\r\n " ,
65
65
(Status .Ok , Set (length(3 ), textPlain, connClose), " get" ),
66
66
),
67
+ // ///////////////////////////////
68
+ // Don't close connection on an unrecognized Connection header
69
+ (
70
+ " GET /get HTTP/1.1\r\n Connection: fiddle-faddle\r\n\r\n " ,
71
+ (Status .Ok , Set (length(3 ), textPlain), " get" ),
72
+ ),
67
73
(" GET /chunked HTTP/1.1\r\n\r\n " , (Status .Ok , Set (textPlain, chunked), " chunk" )),
68
74
// ///////////////////////////////
69
75
(
@@ -75,7 +81,7 @@ object ServerTestRoutes extends Http4sDsl[IO] {
75
81
// ///////////////////////////////
76
82
(
77
83
" GET /chunked HTTP/1.0\r\n Connection:Close\r\n\r\n " ,
78
- (Status .Ok , Set (textPlain, connClose ), " chunk" ),
84
+ (Status .Ok , Set (textPlain), " chunk" ),
79
85
),
80
86
// ////////////////////////////// Requests with a body //////////////////////////////////////
81
87
(
@@ -90,7 +96,7 @@ object ServerTestRoutes extends Http4sDsl[IO] {
90
96
// ///////////////////////////////
91
97
(
92
98
" POST /post HTTP/1.0\r\n Connection:close\r\n Content-Length:3\r\n\r\n foo" ,
93
- (Status .Ok , Set (textPlain, length(4 ), connClose ), " post" ),
99
+ (Status .Ok , Set (textPlain, length(4 )), " post" ),
94
100
),
95
101
// ///////////////////////////////
96
102
(
@@ -119,7 +125,7 @@ object ServerTestRoutes extends Http4sDsl[IO] {
119
125
// /////////////////////////////// Check corner cases //////////////////
120
126
(
121
127
" GET /twocodings HTTP/1.0\r\n Connection:Close\r\n\r\n " ,
122
- (Status .Ok , Set (textPlain, length(3 ), connClose ), " Foo" ),
128
+ (Status .Ok , Set (textPlain, length(3 )), " Foo" ),
123
129
),
124
130
// /////////////// Work with examples that don't have a body //////////////////////
125
131
(" GET /notmodified HTTP/1.1\r\n\r\n " , (Status .NotModified , Set (), " " )),
0 commit comments