阅读boost http服务器示例(请参阅http://www.boost.org/doc/libs/1_54_0/doc/html/boost_asio/examples/cpp11_examples.html)并在request_parser.cpp文件中,我看到header_lws状态。部分代码如下:
case header_line_start:
if (input == '\r')
{
state_ = expecting_newline_3;
return indeterminate;
}
else if (!req.headers.empty() && (input == ' ' || input == '\t'))
{
state_ = header_lws;
return indeterminate;
}
else if (!is_char(input) || is_ctl(input) || is_tspecial(input))
{
return bad;
}
else
{
req.headers.push_back(header());
req.headers.back().name.push_back(input);
state_ = [header_name];
return indeterminate;
}
case header_lws:
if (input == '\r')
{
state_ = expecting_newline_2;
return indeterminate;
}
else if (input == ' ' || input == '\t')
{
return indeterminate;
}
else if (is_ctl(input))
{
return bad;
}
else
{
state_ = header_value;
req.headers.back().value.push_back(input);
return indeterminate;
}
在boost http服务器示例中,header_lws状态意味着什么?