Continued development on line model.
This commit is contained in:
parent
6fbab9fd32
commit
0510ad5dc7
@ -12,6 +12,8 @@ namespace http {
|
||||
|
||||
coreutils::Log(coreutils::LOG_DEBUG_4) << "DATA[" << request << "]";
|
||||
|
||||
if(mode == REQUEST) {
|
||||
|
||||
coreutils::PString request1(request);
|
||||
HTTPRequest httpRequest(request1);
|
||||
|
||||
@ -37,6 +39,15 @@ namespace http {
|
||||
data << httpRequest.response.getResponse(content.str());
|
||||
}
|
||||
|
||||
grabInput();
|
||||
mode = IMFHEADER;
|
||||
}
|
||||
else if(mode == IMFHEADER) {
|
||||
HTTPHeader header(content);
|
||||
releaseGrab();
|
||||
mode = REQUEST;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -12,6 +12,10 @@ namespace http {
|
||||
public:
|
||||
int processCommand(std::string request, core::TCPSession *session, std::stringstream &data) override;
|
||||
|
||||
private:
|
||||
enum Mode { REQUEST, IMFHEADER };
|
||||
Mode mode = REQUEST;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
BIN
HTTPServer
BIN
HTTPServer
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user