mirror of
https://github.com/boostorg/beast.git
synced 2025-07-29 20:37:31 +02:00
Add test for issue #1188
This commit is contained in:
@ -1,3 +1,9 @@
|
||||
Version 177:
|
||||
|
||||
* Add test for issue #1188
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Version 176:
|
||||
|
||||
* Tidy up Quick Reference
|
||||
|
@ -343,6 +343,23 @@ public:
|
||||
BEAST_EXPECT(std::distance(m1.begin(), m1.end()) == 0);
|
||||
}
|
||||
|
||||
void
|
||||
testIssue1187()
|
||||
{
|
||||
// make sure parser finishes on redirect
|
||||
error_code ec;
|
||||
parser_type<false> p;
|
||||
p.eager(true);
|
||||
p.put(buf(
|
||||
"HTTP/1.1 301 Moved Permanently\r\n"
|
||||
"Location: https://www.ebay.com\r\n"
|
||||
"\r\n\r\n"), ec);
|
||||
BEAST_EXPECTS(! ec, ec.message());
|
||||
BEAST_EXPECT(p.is_header_done());
|
||||
BEAST_EXPECT(! p.is_done());
|
||||
BEAST_EXPECT(p.need_eof());
|
||||
}
|
||||
|
||||
void
|
||||
run() override
|
||||
{
|
||||
@ -351,6 +368,7 @@ public:
|
||||
testNeedMore<multi_buffer>();
|
||||
testGotSome();
|
||||
testIssue818();
|
||||
testIssue1187();
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user