@@ -115,7 +115,7 @@ TEST_SUITE("[MESSAGE]")
115115
116116 http::request req;
117117 std::error_code ec{};
118- bool finished = http::parser<http::request> {}.parse (req, bad_req, ec);
118+ bool finished = http::parser_request {}.parse (req, bad_req, ec);
119119 REQUIRE (ec == http::http_read_bad_method);
120120 }
121121
@@ -130,7 +130,7 @@ TEST_SUITE("[MESSAGE]")
130130
131131 http::request req;
132132 std::error_code ec{};
133- bool finished = http::parser<http::request> {}.parse (req, bad_req, ec);
133+ bool finished = http::parser_request {}.parse (req, bad_req, ec);
134134 REQUIRE (ec == http::http_read_unsupported_http_version);
135135 }
136136
@@ -145,7 +145,7 @@ TEST_SUITE("[MESSAGE]")
145145
146146 http::request req;
147147 std::error_code ec{};
148- bool finished = http::parser<http::request> {}.parse (req, bad_req, ec);
148+ bool finished = http::parser_request {}.parse (req, bad_req, ec);
149149 REQUIRE (ec == http::http_read_unsupported_http_version);
150150 }
151151
@@ -160,7 +160,7 @@ TEST_SUITE("[MESSAGE]")
160160
161161 http::request req;
162162 std::error_code ec{};
163- bool finished = http::parser<http::request> {}.parse (req, bad_req, ec);
163+ bool finished = http::parser_request {}.parse (req, bad_req, ec);
164164 REQUIRE (ec == http::http_read_unsupported_http_version);
165165 }
166166
@@ -175,7 +175,7 @@ TEST_SUITE("[MESSAGE]")
175175
176176 http::request req;
177177 std::error_code ec{};
178- bool finished = http::parser<http::request> {}.parse (req, bad_req, ec);
178+ bool finished = http::parser_request {}.parse (req, bad_req, ec);
179179 REQUIRE (ec == http::http_read_header_kv_delimiter_not_found);
180180 }
181181
@@ -191,7 +191,7 @@ TEST_SUITE("[MESSAGE]")
191191
192192 http::request req;
193193 std::error_code ec{};
194- bool finished = http::parser<http::request> {}.parse (req, bad_req, ec);
194+ bool finished = http::parser_request {}.parse (req, bad_req, ec);
195195 REQUIRE (ec == http::http_read_header_unsupported_field); // (It should be "Host:" not "Host :")
196196 }
197197
@@ -206,7 +206,7 @@ TEST_SUITE("[MESSAGE]")
206206
207207 http::request req;
208208 std::error_code ec{};
209- bool finished = http::parser<http::request> {}.parse (req, bad_req, ec);
209+ bool finished = http::parser_request {}.parse (req, bad_req, ec);
210210 REQUIRE (!bool (ec));
211211 REQUIRE (!finished); // Incorrect Content-Length
212212 REQUIRE (bad_req.empty ());
@@ -222,7 +222,7 @@ TEST_SUITE("[MESSAGE]")
222222
223223 http::request req;
224224 std::error_code ec{};
225- bool finished = http::parser<http::request> {}.parse (req, bad_req, ec);
225+ bool finished = http::parser_request {}.parse (req, bad_req, ec);
226226 REQUIRE (!bool (ec));
227227 REQUIRE (!finished); // Waiting for \r\n to test header
228228 }
@@ -239,7 +239,7 @@ TEST_SUITE("[MESSAGE]")
239239
240240 http::request req;
241241 std::error_code ec{};
242- bool finished = http::parser<http::request> {}.parse (req, bad_req, ec);
242+ bool finished = http::parser_request {}.parse (req, bad_req, ec);
243243 REQUIRE (!bool (ec));
244244 REQUIRE (finished); // Done
245245 REQUIRE (bad_req.empty ());
@@ -258,7 +258,7 @@ TEST_SUITE("[MESSAGE]")
258258
259259 http::response reply;
260260 std::error_code ec{};
261- bool finished = http::parser<http::response> {}.parse (reply, bad_reply, ec);
261+ bool finished = http::parser_response {}.parse (reply, bad_reply, ec);
262262 REQUIRE (ec == http::http_read_unsupported_http_version);
263263 }
264264
@@ -272,7 +272,7 @@ TEST_SUITE("[MESSAGE]")
272272
273273 http::response reply;
274274 std::error_code ec{};
275- bool finished = http::parser<http::response> {}.parse (reply, bad_reply, ec);
275+ bool finished = http::parser_response {}.parse (reply, bad_reply, ec);
276276 REQUIRE (ec == http::http_read_unsupported_http_version);
277277 }
278278
@@ -286,7 +286,7 @@ TEST_SUITE("[MESSAGE]")
286286
287287 http::response reply;
288288 std::error_code ec{};
289- bool finished = http::parser<http::response> {}.parse (reply, bad_reply, ec);
289+ bool finished = http::parser_response {}.parse (reply, bad_reply, ec);
290290 REQUIRE (ec == http::http_read_unsupported_http_version);
291291 }
292292
@@ -300,7 +300,7 @@ TEST_SUITE("[MESSAGE]")
300300
301301 http::response reply;
302302 std::error_code ec{};
303- bool finished = http::parser<http::response> {}.parse (reply, bad_reply, ec);
303+ bool finished = http::parser_response {}.parse (reply, bad_reply, ec);
304304 REQUIRE (ec == http::http_read_bad_status);
305305 }
306306
@@ -314,7 +314,7 @@ TEST_SUITE("[MESSAGE]")
314314
315315 http::response reply;
316316 std::error_code ec{};
317- bool finished = http::parser<http::response> {}.parse (reply, bad_reply, ec);
317+ bool finished = http::parser_response {}.parse (reply, bad_reply, ec);
318318 REQUIRE (ec == http::http_read_header_kv_delimiter_not_found);
319319 }
320320
@@ -328,7 +328,7 @@ TEST_SUITE("[MESSAGE]")
328328
329329 http::response reply;
330330 std::error_code ec{};
331- bool finished = http::parser<http::response> {}.parse (reply, bad_reply, ec);
331+ bool finished = http::parser_response {}.parse (reply, bad_reply, ec);
332332 REQUIRE (ec == http::http_read_header_unsupported_field);
333333 }
334334
@@ -342,7 +342,7 @@ TEST_SUITE("[MESSAGE]")
342342
343343 http::response reply;
344344 std::error_code ec{};
345- bool finished = http::parser<http::response> {}.parse (reply, bad_reply, ec);
345+ bool finished = http::parser_response {}.parse (reply, bad_reply, ec);
346346 REQUIRE (ec == http::http_read_header_unsupported_field);
347347 }
348348
@@ -356,7 +356,7 @@ TEST_SUITE("[MESSAGE]")
356356
357357 http::response reply;
358358 std::error_code ec{};
359- bool finished = http::parser<http::response> {}.parse (reply, bad_reply, ec);
359+ bool finished = http::parser_response {}.parse (reply, bad_reply, ec);
360360 REQUIRE (!bool (ec));
361361 REQUIRE (!finished); // Wrong content length. Waiting for rest of payload
362362 REQUIRE (bad_reply.empty ());
@@ -372,7 +372,7 @@ TEST_SUITE("[MESSAGE]")
372372
373373 http::response reply;
374374 std::error_code ec{};
375- bool finished = http::parser<http::response> {}.parse (reply, good_reply, ec);
375+ bool finished = http::parser_response {}.parse (reply, good_reply, ec);
376376 REQUIRE (!bool (ec));
377377 REQUIRE (finished); // Good
378378 REQUIRE (good_reply.empty ());
@@ -449,14 +449,14 @@ TEST_SUITE("[MESSAGE]")
449449
450450 SUBCASE (" parse entire message" )
451451 {
452- const bool finished = http::parser<http::request> {}.parse (req1, buf, ec);
452+ const bool finished = http::parser_request {}.parse (req1, buf, ec);
453453 REQUIRE (!bool (ec));
454454 REQUIRE (finished);
455455 }
456456
457457 SUBCASE (" parse block by block" )
458458 {
459- http::parser<http::request> parser;
459+ http::parser_request parser;
460460
461461 size_t blocksize{};
462462
@@ -522,14 +522,14 @@ TEST_SUITE("[MESSAGE]")
522522
523523 SUBCASE (" parse entire message" )
524524 {
525- const bool finished = http::parser<http::response> {}.parse (resp1, buf, ec);
525+ const bool finished = http::parser_response {}.parse (resp1, buf, ec);
526526 REQUIRE (!bool (ec));
527527 REQUIRE (finished);
528528 }
529529
530530 SUBCASE (" parse block by block" )
531531 {
532- http::parser<http::response> parser;
532+ http::parser_response parser;
533533
534534 size_t blocksize{};
535535
0 commit comments