Skip to content
This repository
Browse code

Timout error responses should be send only if the client sent a

request previously. Otherwise, the connection should be just closed.
  • Loading branch information...
commit 06f9ae1033ce88ebd14a2491dd530a68232591f5 1 parent 5185a4a
Alvaro Lopez Ortega authored January 02, 2012

Showing 1 changed file with 3 additions and 1 deletion. Show diff stats Hide diff stats

  1. 4  cherokee/thread.c
4  cherokee/thread.c
@@ -514,7 +514,9 @@ process_polling_connections (cherokee_thread_t *thd)
514 514
 
515 515
 			/* Most likely a 'Gateway Timeout'
516 516
 			 */
517  
-			if (conn->phase <= phase_add_headers) {
  517
+			if ((conn->phase >= phase_processing_header) ||
  518
+			    (conn->phase == phase_reading_header) && (conn->incoming_header.len >= 1))
  519
+			{
518 520
 				/* Push a hardcoded error
519 521
 				 */
520 522
 				send_hardcoded_error (&conn->socket,

0 notes on commit 06f9ae1

Please sign in to comment.
Something went wrong with that request. Please try again.