From: Jean-Frederic Clere Date: Wed, 30 Sep 2009 08:56:10 +0000 (+0000) Subject: When connecting to no http protocol response will be NULL and httpd cores. X-Git-Tag: 2.3.3~244 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=da843ec5e9c4a4adaf0322fe3fbc19115818c8bb;p=apache When connecting to no http protocol response will be NULL and httpd cores. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@820216 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/proxy/mod_serf.c b/modules/proxy/mod_serf.c index a4eff6bda2..a939a0218e 100644 --- a/modules/proxy/mod_serf.c +++ b/modules/proxy/mod_serf.c @@ -122,6 +122,7 @@ static void closed_connection(serf_connection_t *conn, ap_mpm_register_timed_callback(apr_time_from_msec(1), timed_cleanup_callback, ctx); } + ctx->keep_reading = 0; } static serf_bucket_t* conn_setup(apr_socket_t *sock, @@ -268,6 +269,11 @@ static apr_status_t handle_response(serf_request_t *request, apr_size_t len; serf_status_line sl; + if (response == NULL) { + ctx->rstatus = HTTP_INTERNAL_SERVER_ERROR; + return APR_EGENERAL; + } + /* XXXXXXX: Create better error message. */ rv = serf_bucket_response_status(response, &sl); if (rv) {