Sfoglia il codice sorgente

fixing problem with busy response reported on mailinglist

Christian Grothoff 17 anni fa
parent
commit
796f2638d6
1 ha cambiato i file con 7 aggiunte e 0 eliminazioni
  1. 7 0
      src/daemon/connection.c

+ 7 - 0
src/daemon/connection.c

@@ -1832,6 +1832,13 @@ MHD_connection_handle_idle (struct MHD_Connection *connection)
               connection->state = MHD_CONNECTION_CONTINUE_SENDING;
               break;
             }
+	  if (connection->response != NULL)
+	    {
+	      /* we refused (no upload allowed!) */
+	      connection->remaining_upload_size = 0; 
+	      /* force close, in case client still tries to upload... */
+	      connection->read_closed = MHD_YES; 
+	    }
           connection->state = (connection->remaining_upload_size == 0)
             ? MHD_CONNECTION_FOOTERS_RECEIVED : MHD_CONNECTION_CONTINUE_SENT;
           continue;