This commit is contained in:
fffe
2026-04-24 01:53:17 -07:00
committed by Jari Sundell
parent 4e3ad1ab62
commit dcf24711ef
+6 -1
View File
@@ -80,7 +80,12 @@ SCgiTask::close() {
void
SCgiTask::event_read() {
int bytes = ::recv(m_fileDesc, m_buffer.data() + m_position, m_buffer.size() - m_position - (m_content_length == 0), 0);
int read_length = m_buffer.size() - m_position;
if (m_content_length == 0)
read_length--;
int bytes = ::recv(m_fileDesc, m_buffer.data() + m_position, read_length, 0);
if (bytes <= 0) {
if (bytes == 0 || !(errno == EAGAIN || errno == EINTR))