Skip to content

Commit

Permalink
Timout error responses should be send only if the client sent a
Browse files Browse the repository at this point in the history
request previously. Otherwise, the connection should be just closed.
  • Loading branch information
alobbs committed Jan 2, 2012
1 parent 5185a4a commit 06f9ae1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cherokee/thread.c
Expand Up @@ -514,7 +514,9 @@ process_polling_connections (cherokee_thread_t *thd)

/* Most likely a 'Gateway Timeout'
*/
if (conn->phase <= phase_add_headers) {
if ((conn->phase >= phase_processing_header) ||
(conn->phase == phase_reading_header) && (conn->incoming_header.len >= 1))
{
/* Push a hardcoded error
*/
send_hardcoded_error (&conn->socket,
Expand Down

0 comments on commit 06f9ae1

Please sign in to comment.