While it does not make sense to clone a Parser and be running two
independently on the same buffer simultaneously it is also no worth the
added compexity of forbidding it at this time.
*/
class Parser : public RefCountable
{
- explicit Parser(const Parser&); // do not implement
- Parser& operator =(const Parser&); // do not implement
-
public:
typedef SBuf::size_type size_type;
- Parser() { clear(); }
- virtual ~Parser() {}
+ Parser() : parsingStage_(HTTP_PARSE_NONE) {}
/// Set this parser back to a default state.
/// Will DROP any reference to a buffer (does not free).
*/
class RequestParser : public Http1::Parser
{
- explicit RequestParser(const RequestParser&); // do not implement
- RequestParser& operator =(const RequestParser&); // do not implement
-
public:
/* Http::One::Parser API */
RequestParser() : Parser() {clear();}
- virtual ~RequestParser() {}
virtual void clear();
virtual Http1::Parser::size_type firstLineSize() const {return req.end - req.start + 1;}
virtual bool parse(const SBuf &aBuf);