Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add flag NEXT_ON_MULTIPLEX #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Also answer error
  • Loading branch information
proller committed Oct 30, 2018
commit 6db1975cb79a854905c2430d1f37749d2d440f2a
10 changes: 10 additions & 0 deletions libfcgi/fcgiapp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1604,6 +1604,16 @@ static int ProcessHeader(FCGI_Header header, FCGX_Stream *stream)
return ProcessManagementRecord(header.type, stream);
}
if(requestId != data->reqDataPtr->requestId) {
if(data->reqDataPtr->flags & NEXT_ON_MULTIPLEX) {
FCGI_EndRequestRecord endRequestRecord;
endRequestRecord.header = MakeHeader(FCGI_END_REQUEST, requestId, sizeof(endRequestRecord.body), 0);
endRequestRecord.body = MakeEndRequestBody(0, FCGI_CANT_MPX_CONN);
if(write_it_all(data->reqDataPtr->ipcFd, (char *)&endRequestRecord, sizeof(endRequestRecord)) < 0) {
SetError(stream, OS_Errno);
return -1;
}
}

return SKIP;
}
if(header.type != data->type) {
Expand Down