Closed aspotashev closed 7 years ago
I don't understand what this patch actually does. Can you explain?
The commit "Do not interpret message as FastCGI record when message.type != 0" fixes a crash in the following scenario:
While processing such a Message, Manager_base::push() will follow the branch "if(request == m_requests.end()) { ... }" and then attempt to interpret the Message as a FastCGI record (see "reinterpret_cast<Protocol::Header>(message.data.begin());"), even though it's not a FastCGI record and it has no valid message.data.
Alright this makes sense now. I get it. Nice catch! Much appreciated thanks. While trying to work with your fix I noticed another bug as well. Ultimately I fixed it with 3e51cf49 to work around it. Try the new master head and see if it's all well.
The crash occurs when the request is not in the fastcgipp's std::map anymore, and application code sends an empty Fastcgipp::Message(1).