Index: modules/http/http_protocol.c =================================================================== --- modules/http/http_protocol.c (revision 831907) +++ modules/http/http_protocol.c (working copy) @@ -174,6 +174,17 @@ "close"); const char *conn = apr_table_get(r->headers_in, "Connection"); + /* PR47087: If the client sent Expect: 100 and we didn't reply + * with the same, there may be more data we screw up. + * Closing the connection fixes that. Furthermore, when we're + * sending an error or redirection, closing it is likely to be + * the most efficient thing to do too. + * + * Yes this logic could go in the big if, but let's KISS instead. + */ + if (r->expecting_100 && (r->status != HTTP_CONTINUE)) { + r->connection->keepalive = AP_CONN_CLOSE; + } /* The following convoluted conditional determines whether or not * the current connection should remain persistent after this response * (a.k.a. HTTP Keep-Alive) and whether or not the output message