From da843ec5e9c4a4adaf0322fe3fbc19115818c8bb Mon Sep 17 00:00:00 2001 From: Jean-Frederic Clere Date: Wed, 30 Sep 2009 08:56:10 +0000 Subject: [PATCH] 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 --- modules/proxy/mod_serf.c | 6 ++++++ 1 file changed, 6 insertions(+) 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) { -- 2.50.1